Re: [PATCHES] libpq type system 0.9a

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] libpq type system 0.9a
Date: 2008-04-08 19:22:05
Message-ID: 6159.1207682525@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Chernow <ac(at)esilo(dot)com> writes:
> Tom Lane wrote:
>> Better support for arrays and composites is certainly something that
>> people might want, but the problem with this design is that it forces
>> them to buy into a number of other decisions that they don't necessarily
>> want.

> What decisions are we forcing upon the libpq user?

Well, for starters, using binary format. It is undeniable that that
creates more portability risks (cross-architecture and cross-PG-version
issues) than text format. Not everyone wants to take those risks for
benefits that may not be meaningful for their apps.

The other forced decision is the whole PQputf/PQgetf notation, which
people may or may not find natural --- it still seems a pretty poor
choice to me for this specific problem. PQputf, in the form where
you're generating a SQL command string along with some parameters,
isn't too unreasonable, but unless you've already bought into binary
parameter handling it's not gaining all that much either. And
PQgetf is just weird. The format of a PGresult is generally well
known by the app; trying to force it into the model of string
scanning is a poor fit. For instance there's no mapping at all
for what to do with constant parts of the format string.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-08 19:26:16 Re: File system snapshots for multiple file systems
Previous Message Gregory Stark 2008-04-08 19:10:59 Re: File system snapshots for multiple file systems

Browse pgsql-patches by date

  From Date Subject
Next Message Merlin Moncure 2008-04-08 19:26:34 Re: [PATCHES] libpq type system 0.9a
Previous Message Alvaro Herrera 2008-04-08 19:19:53 Re: Partial match in GIN