Re: PostgreSQL 16 release announcement draft

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, chelseadole(at)gmail(dot)com
Subject: Re: PostgreSQL 16 release announcement draft
Date: 2023-08-24 15:23:31
Message-ID: b172b11a-92b2-356e-7450-c801489ecfd9@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/24/23 11:16 AM, jian he wrote:
> hi. Can you check my first email about "a" versus "the" and "pg_stat_activity".

I did when you first sent it, and did not make any changes.

> also:
> "including the `\bind` command, which allows
> users to execute parameterized queries (e.g `SELECT $1 + $2`) then use `\bind`
> to substitute the variables."
>
> The example actually is very hard to reproduce. (it's not that super intuitive).
> fail case:
> test16-# SELECT $1 + $2 \bind 1 2
> test16-# ;
>
> a better example would be (e.g `SELECT $1 , $2`).
> The semicolon still needed to be in the next line.

I agree with updating the example, I'd propose:

SELECT $1::int + $2::int \bind 1 2 \g

which mirrors what's in the docs[1]

Thanks,

Jonathan

[1]
https://www.postgresql.org/docs/16/app-psql.html#APP-PSQL-META-COMMAND-BIND

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2023-08-24 15:38:05 Re: PostgreSQL 16 release announcement draft
Previous Message Matthias van de Meent 2023-08-24 15:22:34 Re: Disabling Heap-Only Tuples