From: | Roman Neuhauser <neuhauser(at)sigpipe(dot)cz> |
---|---|
To: | Alain Roger <raf(dot)news(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Stored procedure |
Date: | 2007-03-13 21:52:06 |
Message-ID: | 20070313215206.GA42098@dagan.sigpipe.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
# raf(dot)news(at)gmail(dot)com / 2007-03-13 18:29:36 +0100:
> Hi,
>
> I have a stored procedure which returns a SETOF RECORD.
> so basically a partial rowtype from a table.
>
> to execute the query in PHP, i must write :
> select * from myschema.sp_a_002('username') as result(Column1 varchar);
>
> to get the result.
>
> However, is there another to get the result without using 'as result(column1
> varchar)' ?
> something like a simple "select * from storedprocedure(param);", for example
> :-)
Yes, create a type, and have the function return SETOF your-type. You
need to name the types *somewhere*.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
From | Date | Subject | |
---|---|---|---|
Next Message | Reece Hart | 2007-03-13 22:07:57 | Re: orphaned PGDATA/base/ subdirectories |
Previous Message | Alan Hodgson | 2007-03-13 21:48:20 | Re: Questions regarding generating the WAL File. |