{"id":95891,"date":"2023-08-22T02:54:00","date_gmt":"2023-08-22T06:54:00","guid":{"rendered":"https:\/\/bugaluu.com\/sapiosexual\/using-named-placeholders-in-queries-and-psqls-alnum-at-the-reddit\/"},"modified":"2025-09-10T14:50:48","modified_gmt":"2025-09-10T18:50:48","slug":"using-named-placeholders-in-queries-and-psqls-alnum-at-the-reddit","status":"publish","type":"post","link":"https:\/\/bugaluu.com\/sapiosexual\/using-named-placeholders-in-queries-and-psqls-alnum-at-the-reddit\/","title":{"rendered":"Using named placeholders in queries and PSQL&#8217;s :alnum: at the &#8230; &#8211; Reddit"},"content":{"rendered":"<p>Executing this yields the error: ActiveRecord::PreparedStatementInvalid (missing value for :alnum in SELECT) In other words, Rails thinks that :alnum is a named placeholder. But it isn&#8217;t, it&#8217;s a PostgreSQL &#8216;s keyword, so my question is: How can I use named placeholders in queries and PSQL&#8217;s :alnum: at the same time?<\/p>\n<p><a href=\"https:\/\/www.reddit.com\/r\/rails\/comments\/twf569\/using_named_placeholders_in_queries_and_psqls\/\" target=\"_blank\" class=\"\">https:\/\/www.reddit.com\/r\/rails\/comments\/twf569\/using_named_placeholders_in_queries_and_psqls\/<\/a>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Executing this yields the error: ActiveRecord::PreparedStatementInvalid (missing value for :alnum in SELECT) In other words, Rails thinks that :alnum is a named placeholder. But it&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-95891","post","type-post","status-publish","format-standard","hentry","category-web","wpcat-3-id"],"_links":{"self":[{"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/posts\/95891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/comments?post=95891"}],"version-history":[{"count":0,"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/posts\/95891\/revisions"}],"wp:attachment":[{"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/media?parent=95891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/categories?post=95891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bugaluu.com\/sapiosexual\/wp-json\/wp\/v2\/tags?post=95891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}