Re: psql syntax for array of strings in a variable?

2021-10-29 Thread Philip Semanchuk
> On Oct 29, 2021, at 2:05 PM, Tom Lane wrote: > > "David G. Johnston" writes: >> On Friday, October 29, 2021, Philip Semanchuk >> wrote: >>> I would appreciate help with the syntax for querying an array of strings >>> declared as a psql variable. Here's an example. >>> >>> \set important_d

Re: psql syntax for array of strings in a variable?

2021-10-29 Thread Tom Lane
"David G. Johnston" writes: > On Friday, October 29, 2021, Philip Semanchuk > wrote: >> I would appreciate help with the syntax for querying an array of strings >> declared as a psql variable. Here's an example. >> >> \set important_days ARRAY['monday', 'friday'] > Not sure why the single quote

Re: psql syntax for array of strings in a variable?

2021-10-29 Thread Pavel Stehule
Hi pá 29. 10. 2021 v 19:21 odesílatel Philip Semanchuk < phi...@americanefficient.com> napsal: > Hi, > I would appreciate help with the syntax for querying an array of strings > declared as a psql variable. Here's an example. > > \set important_days ARRAY['monday', 'friday'] > > select 1 where 'm

Re: psql syntax for array of strings in a variable?

2021-10-29 Thread David G. Johnston
On Friday, October 29, 2021, Philip Semanchuk wrote: > Hi, > I would appreciate help with the syntax for querying an array of strings > declared as a psql variable. Here's an example. > > \set important_days ARRAY['monday', 'friday'] Not sure why the single quotes are getting stripped out but t

psql syntax for array of strings in a variable?

2021-10-29 Thread Philip Semanchuk
Hi, I would appreciate help with the syntax for querying an array of strings declared as a psql variable. Here's an example. \set important_days ARRAY['monday', 'friday'] select 1 where 'monday' = ANY(:important_days); ERROR: 42703: column "monday" does not exist LINE 1: select 1 where 'monday'