On Wed, Mar 5, 2008 at 5:47 PM, Florian G. Pflug <[EMAIL PROTECTED]> 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 -- Sent via pgsql-patches mailing list (firstname.lastname@example.org) To make changes to your subscription: http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-patches