From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Andrew Chernow <ac(at)esilo(dot)com> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Joe Conway <mail(at)joeconway(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCHES] libpq type system 0.9a |
Date: | 2008-04-09 12:25:27 |
Message-ID: | 47FCB5B7.7050202@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Andrew Chernow wrote:
> Andrew Dunstan wrote:
>>
>>
>> Merlin Moncure wrote:
>>> However, due to libpq limitations, if any datatype must
>>> return text the entire result must be text (resultFormat)...this is
>>
>> I'm surprised you didn't try to address that limitation.
>>
>>
>
> That would change the existing behavior of resultFormat, although not
> terribly. Currently, the server will spit back an error if you use
> binary results but some type hasn't implemented a send/recv. Instead
> of an error, the server could "fallback" to the type's in/out routines
> and mark the column as text format.
>
> I think the "fallback" approach is more intelligent behavior but such
> a change could break libpq clients. They might be blindly ASSuming if
> the exec worked with resultFormat=1, that everything returned by
> PQgetvalue will be binary (I'm guilty of this one, prior to libpqtypes).
>
> Our patch would work with no changes because it supports text and
> binary results. So, each type handler already toggles itself based on
> PQfformat.
That makes it sound more like a protocol limitation, rather than a libpq
limitation. Or am I misunderstanding?
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2008-04-09 12:35:11 | Re: [PATCHES] libpq type system 0.9a |
Previous Message | Andrew Chernow | 2008-04-09 12:14:58 | Re: [PATCHES] libpq type system 0.9a |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2008-04-09 12:35:11 | Re: [PATCHES] libpq type system 0.9a |
Previous Message | Andrew Chernow | 2008-04-09 12:14:58 | Re: [PATCHES] libpq type system 0.9a |