Re: Proposal: real procedures again (8.4)

From: "Zeugswetter Andreas ADI SD" <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Hannu Krosing" <hannu(at)skype(dot)net>, "David Fetter" <david(at)fetter(dot)org>, "Josh Berkus" <Josh(dot)Berkus(at)sun(dot)com>, "Merlin Moncure" <mmoncure(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: real procedures again (8.4)
Date: 2007-10-30 14:24:20
Message-ID: E1539E0ED7043848906A8FF995BDA5790283F85D@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > I think the cool thing that Josh Berkus wants is
> >
> > return query select a, b, c from foo;
> > return query select d, e, f from bar;
> >
>
> maybe better
>
> SELECT a,b FROM foo;
> SELECT d, e FROM bar;
>
> procedure doesn't need return statement usually

The background for Quel was, that when selecting all fields from
an inheritance hierarchy you got the additional fields of each child.

Thus the field count and types could vary within one cursor.
Like if you would allow the following:
select a, b::int from foo
union all
select a, c::varchar, d, e from bar

I don't think anybody would want to transfer that idea to sql clients.
In sql the first statement would define field count, name/alias and
type.
The second statement would need to implicitly cast or fail if it does
not match.

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-10-30 14:25:33 Re: Multiple trees in parsetree_list
Previous Message Camilo Porto 2007-10-30 14:16:39 Re: URGENT HELP about 'duration' stats