From: | Chris Bitmead <chris(at)bitmead(dot)com> |
---|---|
To: | Hannu Krosing <hannu(at)tm(dot)ee> |
Cc: | "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>, pgsql-oo(at)postgresql(dot)org |
Subject: | Re: Proposed new libpq API |
Date: | 2000-07-05 09:59:13 |
Message-ID: | 396306F1.DF9D960A@bitmead.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hannu Krosing wrote:
> Let me propose an additional possible solution for the most common case
> needing to return multiple types of tuples, the case of select ** --
> just
> have a tupletype for each tuple, possibly as an implies field and return
> NULL
> for missing fields (returning nulls is cheap - each only occupies one
> bit)
> so that
>
> SELECT user
> UNION
> SELECT nextval('myseq');
>
> would return a result with the following structure
>
> type() | user (text) | nextval(int)
> -----------------------------------
> t1 | postgres | NULL
> t2 | NULL | 1
>
> such way of returning tuples could possibly make also non-OO folks happy
> as the result will still be table-shaped ;)
What is the essence of your suggestion? The libpq interface, the
protocol or the formatting for psql?
The main problem I can see with the way your idea is going, is that if a
class has a few dozen subclasses, each with a few dozen fields, you
could end up with a couple of thousand resulting columns.
That and it doesn't seem very OO.
> Will the group carry only structurte or will it have some "higher"
> meaning -
> i.e. will rows selected form two different tables with the same
> structure
> be in the same group ?
That is the one thing in my mind I'm not certain of. At the moment I
will say that aspect is undefined. Hopefully a clearer answer will
emerge once it is actually working.
--
Chris Bitmead
mailto:chris(at)bitmead(dot)com
http://www.techphoto.org - Photography News, Stuff that Matters
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2000-07-05 10:06:49 | Re: current CVS: undefined reference to `PGLZ_RAW_SIZE' |
Previous Message | Jan Wieck | 2000-07-05 09:42:39 | Re: [HACKERS] Revised Copyright: is this more palatable? |