Re: ADTs and embedded sql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ADTs and embedded sql
Date
Msg-id 12675.1024591054@sss.pgh.pa.us
Whole thread Raw
In response to ADTs and embedded sql  ("Tony Griffiths(RA)" <griffitt@cs.man.ac.uk>)
List pgsql-hackers
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk> writes:
> a) The client-side programmer has to be responsible for parsing the 
> returned string, which could cause problems if the output format of the 
> ADT is changed, and

You seem to be proposing that we instead expose the internal storage
format of the ADT, which seems to me to be much more likely to change
than the string representation.  (Not to mention that it will open up a
host of platform compatibility issues --- endianness, struct packing,
float format rules for example.)

To give just one example, as of 7.3 there will be two entirely different
internal formats for the datetime-related types.  A client would have
to be prepared to cope with that, on top of possible endian and float
format differences between server and client machines.

Parsing the string representation may be an annoyance, but I suspect
it is the lesser evil.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Democracy and organisation : let's make a revolution in
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Democracy and organisation : let's make a revolution