Thread: libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns
libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns
From
Ivo Raisr
Date:
Hi guys, I hacked PostgreSQL 8.4.1 libpq and added a new function to specify resultFormat for individual result columns. Are you interested in a patch? (http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html says: There is not currently a provision to obtain different result columns in different formats, although that is possible in the underlying protocol. So I made this possible.) Kind regards, Ivosh
Re: libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns
From
Merlin Moncure
Date:
On Mon, Nov 2, 2009 at 6:00 AM, Ivo Raisr <ivosh@ivosh.net> wrote: > Hi guys, > I hacked PostgreSQL 8.4.1 libpq and added a new function to specify > resultFormat for individual result columns. > Are you interested in a patch? > > (http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html says: > There is not currently a provision to obtain different result columns > in different formats, although that is possible in the underlying > protocol. > So I made this possible.) How exactly did you do it? You can't change the arguments of existing libpq functions, you would have had to add new ones... merlin
Re: libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns
From
David Fetter
Date:
On Mon, Nov 02, 2009 at 12:00:29PM +0100, Ivo Raisr wrote: > Hi guys, > I hacked PostgreSQL 8.4.1 libpq and added a new function to specify > resultFormat for individual result columns. > Are you interested in a patch? New features only go into git head (aka CVS TIP), so for future reference, only patch that. One of the ways PostgreSQL has earned its reputation for stability is by never adding a feature to a released version :) > (http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html > says: There is not currently a provision to obtain different result > columns in different formats, although that is possible in the > underlying protocol. So I made this possible.) How? Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
Re: libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns
From
Andrew Chernow
Date:
Ivo Raisr wrote: > Hi guys, > I hacked PostgreSQL 8.4.1 libpq and added a new function to specify > resultFormat for individual result columns. > Are you interested in a patch? > > (http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html says: > There is not currently a provision to obtain different result columns > in different formats, although that is possible in the underlying > protocol. > So I made this possible.) > Can you explain the use case for this? Have you investigated libpqtypes? -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/