Search Postgresql Archives

Re: "parameterized views" or return-type-inferring SQL functions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oh, sorry for the reply-to-self, but I know I can write an SQL function
with an OUT parameter list to do this. Like creating a custom rowtype
for the job, though, this gets cumbersome if the column-list is long, or
changes to the input tables might ever result in a change to column-list
types, add columns, etc.

Being able to write:

CREATE OR REPLACE FUNCTION blah(IN DATE, OUT a.*, OUT b.*) AS $$
SELECT * FROM a, b;
$$ LANGUAGE 'sql'

... would be somewhat helpful as another form of the ability to expand
rowtypes for use in declarations, but having to list all the OUT
parameters explicitly as I currently do is no better than using CREATE
TYPE to make a custom rowtype or listing all the colums at call-sites
for a RECORD returning function.

-- 
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux