Re: WHERE col = ANY($1) extended to 2 or more columns?

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: WHERE col = ANY($1) extended to 2 or more columns?
Date: 2023-02-09 16:03:54
Message-ID: CAFCRh-_yM=03ts=Es73ejoEARJKfymc7RAk8DzKpF2TXsEy++w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 9, 2023 at 4:51 PM David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:

> On Thu, Feb 9, 2023 at 8:41 AM Dominique Devienne <ddevienne(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-02-09 16:05:52 Re: Using PostgreSQL for service discovery and health-check
Previous Message Dominique Devienne 2023-02-09 15:58:27 Re: Using PostgreSQL for service discovery and health-check