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

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: WHERE col = ANY($1) extended to 2 or more columns?
Date: 2023-02-09 15:41:41
Message-ID: CAFCRh-_7VMpCBFk6iGMN12gJF2hfX-iWU1QReVrjsgyJt0wKiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. We are implementing an API which takes a list of row keys, and must
return info about those rows. To implement that efficiently, in as few
round-trips as possible, we bind a (binary) array of keys (ints, uuids, or
strings) and that works great, but only if the key is a scalar one.

Now we'd like to do the same for composite keys, and I don't know how to do
that.
Is it possible? Could someone please help out or demo such a thing?
We are doing it in C++ using libpq, but a pure SQL or PL/pgSQL demo would
still help (I think).

Thanks, --DD

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-02-09 15:42:05 Re: PostgreSQL
Previous Message Dominique Devienne 2023-02-09 15:30:06 Using PostgreSQL for service discovery and health-check