ADTs and embedded sql - Mailing list pgsql-hackers

From Tony Griffiths(RA)
Subject ADTs and embedded sql
Date
Msg-id 3D11CF40.1000900@cs.man.ac.uk
Whole thread Raw
Responses Re: ADTs and embedded sql  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ADTs and embedded sql  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
List pgsql-hackers
Hi,
I've a question about returning ADT values through embedded SQL. It's 
fine to retrieve values of PostgreSQL's build-in types in to C variables 
of roughly the same type, with only (possibly) a  small impedance 
mismatch. However when we want to retrieve into values of the ADTs, 
i.e., the geometric types, it looks like we have to retrieve them into 
strings, and then manually convert them into the correct type - if this 
is not the case then a posting of how to do this into variables of the 
correct type would be great. This means that:

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

b) The impedance mismatch is much greater than that of the built-in types.

Are there any plans to extend the ADT registration process to allow 
output of the actual type (not just the string) (I seem to remember that 
INGRES did this a while ago, with admittedly a much more complex 
registration process), and also for ecpg to be able to correctly parse 
variables other than those built into the database kernel.

Many thanks,

Tony



pgsql-hackers by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: Democracy and organisation : let's make a revolution in the Debian way
Next
From: Hannu Krosing
Date:
Subject: Re: Democracy and organisation : let's make a revolution