Question about "compound" queries.

From: "Anton A(dot) Melnikov" <aamelnikov(at)inbox(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Question about "compound" queries.
Date: 2022-10-24 22:02:17
Message-ID: 4b9c5232-56d6-7d4c-0185-3dce3791874c@inbox.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

Please, could somebody explain what the "compound" queries were created for?
Maybe i'm calling them wrong. It's about queries like:
SELECT 1 + 2 \; SELECT 2.0 AS "float" \; SELECT 1;

Such queries can neither be prepared nor used in the extended protocol with
ERROR: cannot insert multiple commands into a prepared statement.
What are their advantages?
And what is the proper name for such queries? "Compound" or something else?
Would be very grateful for clarification.

Best wishes,

--
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-10-24 22:05:44 Re: fix stats_fetch_consistency value in postgresql.conf.sample
Previous Message Melanie Plageman 2022-10-24 19:39:01 Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)