Re: Add Pipelining support in psql

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add Pipelining support in psql
Date: 2025-03-18 23:56:54
Message-ID: Z9oIRs2c7SCTNmfi@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 18, 2025 at 10:36:28AM +0100, Daniel Verite wrote:
> It's actually possible to use parameters
>
> \startpipeline
> \bind 'foo'
> select $1;
> \endpipeline
>
> ?column?
> ----------
> foo
> (1 row)
>
> I suspect there's a misunderstanding that \bind can only be placed
> after the query, because it's always written like that in the regression
> tests, and in the documentation.
> But that's just a notational preference.

Nice trick, unrelated to pipelines. I don't think that we have
anything testing this specific pattern for \bind. At quick glance all
our test use \bind at the end of a query string. Perhaps we should?
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2025-03-19 00:18:28 Re: add function argument name to substring and substr
Previous Message Gregory Smith 2025-03-18 23:52:04 Re: Increase default maintenance_io_concurrency to 16