Re: [PATCHES] libpq type system 0.9a

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [PATCHES] libpq type system 0.9a
Дата
Msg-id b42b73150804081849o316754a8tb9f4c20131254eb6@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCHES] libpq type system 0.9a  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: [PATCHES] libpq type system 0.9a  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Tue, Apr 8, 2008 at 9:28 PM, Jeff Davis <pgsql@j-davis.com> wrote:

with proposed changes, (I think) all your suggestions are addressed/moot. see:

>   * The ability to choose some result columns to be binary-formatted and
>  others to be text-formatted. I haven't thought of a reasonable API for
>  this yet, particularly since we already have so many ways of executing a
>  statement.

with PQgetf, you are abstracted from resultformat.  The library
converts your data for you into consistent types (in practice, the
result format is always binary)...without the 'negatives' of dealing
with binary data.

>   * an "escapeIdent" function.

not sure what this is...

>   * PQescapeBytea escapes for both inclusion in a SQL statement and also
>  the escaping for the input function for bytea. This means that, if you
>  are passing a binary value as a text-format parameter, using
>  PQescapeBytea is incorrect, and you need to write your own octal escape
>  routine. This is obviously a minor complaint, and may not even be worth
>  polluting the namespace. I only mention it because it seems like an easy
>  mistake to make.

PQescapeBytea is unnecessary with proposed patch...input parameters
are moved to proper format by the library.  You simply %bytea the
parameter and let the library handle the rest.

merlin


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: [PATCHES] libpq type system 0.9a
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: [PATCHES] libpq type system 0.9a