Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx

Поиск
Список
Период
Сортировка
От Anthonin Bonnefoy
Тема Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx
Дата
Msg-id CAO6_XqoxjRngBxnQdT0HL6HJrva5jpKeRvs3H6T8XGoTh2PDVw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
> I do realize the same is true for plain \bind, but it seems
> like a bug there too.

The unscanned bind's parameters are discarded later in the
HandleSlashCmds functions. So adding the ignore_slash_options() for
inactive branches scans and discards them earlier. I will add it to
match what's done in the other commands but I don't think it's
testable as the behaviour is the same unless I miss something.

I did add the \bind, \bindx, \close and \parse to the inactive branch
tests to complete the list.

> One more usability thing. I think \parse and \close should not require
> a \g to send the message. You can do that by returning PSQL_CMD_SEND
> instead of PSQL_CMD_SKIP_LIN

Changed.

> I think the examples for \bindx and \close
> should use \parse instead of PREPARE

Done. I had to rely on manual PREPARE for my first tests and it leaked
in the docs.

Вложения

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

Предыдущее
От: Jeevan Chalke
Дата:
Сообщение: Re: More new SQL/JSON item methods
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: psql JSON output format