Re: Libpq support for precision and scale

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Libpq support for precision and scale
Дата
Msg-id 25893.1015552011@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Libpq support for precision and scale  (Fernando Nasser <fnasser@redhat.com>)
Список pgsql-hackers
Fernando Nasser <fnasser@redhat.com> writes:
> We have agreed to add another call to set a flag for including the
> metadata on the PQexec call (which would make it work like the
> PQexecIncludeMetadata described above).  It will be in the REPOST patch.

That works for me.  Among other things, it solves the problem where the
code that wants the metadata is a layer or two above the place that's
actually issuing PQexec.  Setting a persistent option in the PGconn
object gets around the difficulty that the caller of PQexec may not know
metadata will be wanted later.

> Question: should it affect only the next PQexec(), or should we require
> the user to reset it?

It should be persistent till reset, see above.

> An even worse problem is that
> it'll fail entirely with a multi-query query string.

I'm still quite unhappy about this; it more or less destroys the layer
independence mentioned above.  Please think harder.  Perhaps it could
be set up so that metadata is only collected for the last result of a
query string, after you determine that there are no more results?
Which is still not great, but better than failing outright with
multi-query strings.
        regards, tom lane


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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: point in time recovery and moving datafiles online
Следующее
От: Tom Lane
Дата:
Сообщение: Re: point in time recovery and moving datafiles online