Re: functions

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: functions
Дата
Msg-id 200208261022.13053.josh@agliodbs.com
обсуждение исходный текст
Ответ на functions  (Andrei Popovici <andreipopovici@yahoo.com>)
Ответы Re: functions  (Andrei Popovici <andreipopovici@yahoo.com>)
Список pgsql-novice
Andrei,

> I understand that the PG synonym of MS-SQL stored
> procedure is the 'function'. Am I right?
>
> If so, then is it possible to return a multi-field,
> multi-row set from a function (just the way a simple
> 'select' does in MS-SQL stored procs)?

There is an awkward way of doing this in Postgres 7.2.1, involving CURSORS.
In 7.3, which will be out in beta sometime soon, it will be possible to have
T-SQL-like row-returning Functions.

There is one other difference btw. Postgres Functions and MSSQL Procedures;
Postgres functions may be called within a query, and MSSQL procdedures may
not.  On the other hand, MSSQL procedures may return multiple result sets,
and I don't think anyone is proposing this for Postgres.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: Andrei Popovici
Дата:
Сообщение: functions
Следующее
От: Andrei Popovici
Дата:
Сообщение: Re: functions