Re: function that returns a set of records and integer(both of them)‏

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: function that returns a set of records and integer(both of them)‏
Дата
Msg-id 162867790807120005o368dcdbeh4e18eea00cff0959@mail.gmail.com
обсуждение исходный текст
Ответ на function that returns a set of records and integer(both of them)‏  (daniel blanco <daniel_b_adrian@hotmail.com>)
Ответы RE: function that returns a set of records and integer(both of them)‏  (daniel blanco <daniel_b_adrian@hotmail.com>)
Список pgsql-sql
2008/7/11 daniel blanco <daniel_b_adrian@hotmail.com>:
> Hi Everyone
>
> I would like to know if i can create a function that returns a set of record
> with the sql statement: select and a integer, i mean both of them, because i
> remenber that in sql server (transact sql) i can do that in a stored
> procedure doing a select statement and a return of a integer in the same
> procedure,

when I worked with T-SQL this wasn't possible - stored procedure
should return recordset or multirecord set or OUT variables. And it
was solution. When I would returns some similar like you, I had to
return two recordsets.

i'm migrating to postgresql and i have stored procedures like
> this in my sql server database, can i do that with postgresql?

You cannot return integer and recordset from function  now. There is
one       workaround, you can return set of cursors.

Regards
Pavel Stehule

>
> Thanks.........
> ________________________________
> Get news, entertainment and everything you care about at Live.com. Check it
> out!


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

Предыдущее
От: Lewis Cunningham
Дата:
Сообщение: Re: Rollback in Postgres
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Rollback in Postgres