Re: [PATCHES] libpq type system 0.9a

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] libpq type system 0.9a
Дата
Msg-id 5204.1207849253@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] libpq type system 0.9a  (Andrew Chernow <ac@esilo.com>)
Ответы Re: [PATCHES] libpq type system 0.9a  (Andrew Chernow <ac@esilo.com>)
Список pgsql-hackers
Andrew Chernow <ac@esilo.com> writes:
> PGresult *PQresultDup(
>    PGconn *conn,
>    PGresult *res,
>    int ntups,
>    int numAttributes,
>    PGresAttDesc *attDescs);

I don't understand why this is a "dup" operation.  How can you "dup"
if you are specifying a new tuple descriptor?  I'd have expected
something like

PGresult *PQmakeResult(PGconn *conn, int numAttributes, PGresAttDesc *attDescs)

producing a zero-row PGRES_TUPLES_OK result that you can then load with
data via PQresultSetFieldValue calls.  (Even the conn argument is a bit
of a wart, but I think we probably need it so we can copy some of its
private fields.)

Copying an existing PGresult might have some use too, but surely that
can't change its tuple descriptor.
        regards, tom lane


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

Предыдущее
От: Andrew Chernow
Дата:
Сообщение: Re: [PATCHES] libpq type system 0.9a
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Index AM change proposals, redux