Re: libpq Describe Extension [WAS: Bytea and perl]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpq Describe Extension [WAS: Bytea and perl]
Дата
Msg-id 9374.1150503681@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: libpq Describe Extension [WAS: Bytea and perl]  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: libpq Describe Extension [WAS: Bytea and perl]  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Volkan YAZICI wrote:
>> The problem is, AFAICS, it's not possible to distinguish between a tuple
>> returning query (T, ..., C, Z or T, E) and a description of a portal (T,
>> Z). Therefore, I've created a global flag (parsing_row_desc) which is
>> turned on when we receive a 'T' and turned off if we receive a 'C' or
>> 'E'. It's a kind of ugly method but the only solution I could come up
>> with.

> The problem with this solution is that it is not thread-safe.  Perhaps
> you can use a per-PGconn boolean?

The whole thing sounds like brute force to me.  Shouldn't you be adding
states to enum PGQueryClass, if you need to track what sort of Describe
you're doing?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: MultiXacts & WAL
Следующее
От: Tom Lane
Дата:
Сообщение: Curious bug in buildfarm files-changed links