Re: libpq PQexecParams & value placeholders

Поиск
Список
Период
Сортировка
От Dmitry Igrishin
Тема Re: libpq PQexecParams & value placeholders
Дата
Msg-id CAAfz9KNzi26oUxuiJdiNB5-_mvddxjsiyLtP7GNKWkqEDtPNDQ@mail.gmail.com
обсуждение исходный текст
Ответ на libpq PQexecParams & value placeholders  (Oleg <lego12239@yandex.ru>)
Ответы Re: libpq PQexecParams & value placeholders
Список pgsql-general
пт, 14 дек. 2018 г. в 14:33, Oleg <lego12239@yandex.ru>:
>
> Hi, all.
>
> Do we really need a numeric value placeholders like $1 in command string?
It's a syntax defined at the backend side.
(https://www.postgresql.org/docs/current/sql-prepare.html)

> Construction of such string for complex non-static queries is very annoying.
That's why there are libraries like Pgfe
(https://github.com/dmitigr/pgfe) or libpqtypes
(http://libpqtypes.esilo.com/)

> Why do we can't simply use $$ placeholder, which take the next value from an
> array of values?
Because $$ means a dollar-quoted opening tag
(https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING)


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

Предыдущее
От: Oleg
Дата:
Сообщение: libpq PQexecParams & value placeholders
Следующее
От: Oleg
Дата:
Сообщение: Re: libpq PQexecParams & value placeholders