ADTs and embedded sql

From: "Tony Griffiths(RA)" <griffitt(at)cs(dot)man(dot)ac(dot)uk>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: ADTs and embedded sql
Date: 2002-06-20 12:49:04
Message-ID: 3D11CF40.1000900@cs.man.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak 2002-06-20 13:05:59 Re: Democracy and organisation : let's make a revolution in the Debian way
Previous Message Jean-Michel POURE 2002-06-20 12:33:04 Re: Democracy and organisation : let's make a revolution in the Debian way