Re: WHERE col = ANY($1) extended to 2 or more columns?
Dominique Devienne <ddevienne@gmail.com>
From: Dominique Devienne <ddevienne@gmail.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Date: 2023-02-09T16:03:54Z
Lists: pgsql-general
On Thu, Feb 9, 2023 at 4:51 PM David G. Johnston <david.g.johnston@gmail.com> wrote: > On Thu, Feb 9, 2023 at 8:41 AM Dominique Devienne <ddevienne@gmail.com> > wrote: > >> Now we'd like to do the same for composite keys, and I don't know how to >> do that. >> > > An array-of-composites is simply: > SELECT ARRAY[ ROW(1, 'one'), ROW(2, 'two') ]::composite_type[]; > Thanks. I don't consider that "simple" myself :). But I'm definitely not an advanced PostgreSQL user! Would still appreciate a more fleshed out demo, if anyone is kind enough to provide it. Thanks, --DD