Re: [PATCHES] libpq type system 0.9a
От | Andrew Chernow |
---|---|
Тема | Re: [PATCHES] libpq type system 0.9a |
Дата | |
Msg-id | 47FCB342.7020301@esilo.com обсуждение исходный текст |
Ответ на | Re: [PATCHES] libpq type system 0.9a (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: [PATCHES] libpq type system 0.9a
|
Список | pgsql-hackers |
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 anerror 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. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/
В списке pgsql-hackers по дате отправления: