Re: PostgreSQL 16 release announcement draft

Поиск
Список
Период
Сортировка
От Jonathan S. Katz
Тема Re: PostgreSQL 16 release announcement draft
Дата
Msg-id b172b11a-92b2-356e-7450-c801489ecfd9@postgresql.org
обсуждение исходный текст
Ответ на Re: PostgreSQL 16 release announcement draft  (jian he <jian.universality@gmail.com>)
Ответы Re: PostgreSQL 16 release announcement draft  (Chapman Flack <chap@anastigmatix.net>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Matthias van de Meent
Дата:
Сообщение: Re: Disabling Heap-Only Tuples
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: PostgreSQL 16 release announcement draft