Re: Correctly producing array literals for prepared statements

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Correctly producing array literals for prepared statements
Дата
Msg-id 4D654182.2000106@dunslane.net
обсуждение исходный текст
Ответ на Re: Correctly producing array literals for prepared statements  (Kenneth Marshall <ktm@rice.edu>)
Ответы Re: Correctly producing array literals for prepared statements  (Andrew Chernow <ac@esilo.com>)
Список pgsql-hackers

On 02/23/2011 10:40 AM, Kenneth Marshall wrote:
>
>>> Can someone please point me in the direction of an established client
>>> library/driver where all corner cases are covered, or at least enough
>>> of them to produce a net gain in usefulness? There may well be
>>> additional subtleties that have not occurred to me.
>> yes: libpqtypes.  it manages everything in binary.  i've been thinking
>> for a while that libpqtypes could be wrapped with variadic templates
>> or other c++ trickery.  Because libpqtypes does everything in binary,
>> it completely sidesteps all the escaping nastiness.
>>
> Avoiding the escaping by using binary parameter transmission is
> the best method. Shameless plug: libpqtypes is great!
> I hope that it can be eventually included in the core distribution.
> It is not uncommon to get "It's an add-on package???" and avoidance
> of pieces outside of the standard dist regardless of its value.
>
>


Binary mode had serious limitations, such as portability.

We do need some support in libpq for constructing and deconstructing 
arrays (and probably for composites too, although that will be harder, I 
suspect).

cheers

andrew




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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: Synchronous standby
Следующее
От: Gurjeet Singh
Дата:
Сообщение: Re: Fix for Index Advisor related hooks