Re: Stored procedure

Поиск
Список
Период
Сортировка
От David Legault
Тема Re: Stored procedure
Дата
Msg-id e0b20d410703131057ue305941x3cf5196f27af59ba@mail.gmail.com
обсуждение исходный текст
Ответ на Stored procedure  ("Alain Roger" <raf.news@gmail.com>)
Список pgsql-general
On 3/13/07, Alain Roger <raf.news@gmail.com> wrote:
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 :-)

thanks a lot,

--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5


That's what I do in PHP

if it returns a set "SELECT * FROM myfunction(arg1,arg2,...)"

Then I can just iterate over every record/line/row.

I don't have any stored proc that actually returns a setof record in any of my functions though, but I would imagine that it doesn't make a difference in how you call it.

Could you past the whole function?

David

В списке pgsql-general по дате отправления:

Предыдущее
От: "Thomas F. O'Connell"
Дата:
Сообщение: Re: New US DST Rules & PostgreSQL
Следующее
От: Jon Lapham
Дата:
Сообщение: Restart after poweroutage