From: | "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com> |
---|---|
To: | Jason Tesser <jtesser(at)nbbc(dot)edu> |
Cc: | Sven Willenberger <sven(at)dmv(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: COnsidering a move away from Postgres |
Date: | 2005-06-30 17:20:18 |
Message-ID: | 200506301020.18034.uwe@oss4u.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I've solved this for my case in 7.4 by defining a view with the desired column
layout and the return setof the view. This certainly depends on what you're
trying to accomplish.
On Thursday 30 June 2005 09:21 am, Jason Tesser wrote:
> Can this return multiples? I thought when you dfined columns dynamically
> like your example it only returns one record and I need to be able to
> return a set. Can your example return a set?
>
> On Thursday 30 June 2005 10:58 am, Sven Willenberger wrote:
> > If I understand the new features correctly, rather than:
> > CREATE FUNCTION foo(i int) RETURNS custom_type AS ....
> > and custom_type is (int,text,text)
> > you will be able to do the following instead:
> > CREATE FUNCTION foo(IN i int, OUT x int, OUT y text, OUT z text) AS ...
> >
> > As far as hard coding the OUT datatypes, if I understand the docs
> > correctly you can even:
> > CREATE FUNCTION foo(IN i int, OUT x anyelement, OUT y anyelement, OUT z
> > anyelement) AS ...
> >
> > No custom type needed .. you specify how the output format in the
> > argument section itself.
> >
> > Sven
--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
From | Date | Subject | |
---|---|---|---|
Next Message | Matt Van Mater | 2005-06-30 17:25:38 | Re: how to use pg_dump and then restored onto development server |
Previous Message | Al_Dev | 2005-06-30 16:55:21 | Language to use with SQL database - Number ONE computer language - Language Shootout |