Re: libpq type system 0.9a

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, "Andrew Chernow" <achernow(at)esilo(dot)com>
Subject: Re: libpq type system 0.9a
Date: 2008-03-05 23:31:34
Message-ID: b42b73150803051531j74caab35i2cee98ea410fbe0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Wed, Mar 5, 2008 at 5:47 PM, Florian G. Pflug <fgp(at)phlo(dot)org> wrote:
> Merlin Moncure wrote:
> > Yesterday, we notified -hackers of the latest version of the libpq
> > type system. Just to be sure the right people are getting notified,
> > we are posting the latest patch here as well. Would love to get some
> > feedback on this.
> Sorry if this has been discussed before, but why is it necessary
> to specify the type when calling PQgetf on a result? It seems that this
> formatting string *always* has to match the type list of your select
> statement, no?

yes...it always has to match. the format string requirements could in
theory be relaxed (for 'get') but this would break symmetry with 'put'
and you would lose a sanity check...getf like scanf writes directly
into application memory so the double-specifying (directly in the
format string and indirectly in the query) isn't necessarily a bad
thing. imagine if your application was 'select * from table' and one
of the field types changed...disaster.

merlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Chernow 2008-03-06 00:12:57 Re: libpq type system 0.9a
Previous Message Florian G. Pflug 2008-03-05 22:47:16 Re: libpq type system 0.9a

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Chernow 2008-03-06 00:12:57 Re: libpq type system 0.9a
Previous Message Florian G. Pflug 2008-03-05 22:47:16 Re: libpq type system 0.9a