Skip site navigation (1) Skip section navigation (2)

Re: Table function support

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Table function support
Date: 2007-04-11 07:16:16
Message-ID: BAY20-F162A01A3DE31F6F2550166F95F0@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
>I've been looking at this, and my feeling is that we should drop the
>PROARGMODE_TABLE business and just define RETURNS TABLE(x int, y int)
>as exactly equivalent to RETURNS SETOF RECORD with x and y treated as
>OUT parameters.  There isn't any advantage to distinguishing the cases
>that outweighs breaking client code that looks at pg_proc.proargmodes.
>I don't believe that the SQL spec prevents us from exposing those
>parameter names to PL functions, especially since none of our PLs are
>in the standard at all.

Reason for PROARGMODE_TABLE was protection before name's collision, and x, 
and y are table attributies (not variables) and then we are protected before 
collision. It's shortcut for

create function foo() returns setof record as ...
select * from foo() as (x int, y int);

Pavel Stehule

Najdete si svou lasku a nove pratele na

In response to

pgsql-patches by date

Next:From: Pavel StehuleDate: 2007-04-11 07:16:17
Subject: Re: Table function support
Previous:From: Tom LaneDate: 2007-04-11 06:52:41
Subject: Re: [HACKERS] CIC and deadlocks

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group