Re: SQL Server -> Postgres migration: Stored Procedure replacement?
От | Tom Lane |
---|---|
Тема | Re: SQL Server -> Postgres migration: Stored Procedure replacement? |
Дата | |
Msg-id | 15156.988644517@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | SQL Server -> Postgres migration: Stored Procedure replacement? ("Eliel Mamousette" <eliel@panix.com>) |
Ответы |
RE: SQL Server -> Postgres migration: Stored Procedure replacement?
|
Список | pgsql-general |
"Eliel Mamousette" <eliel@panix.com> writes: > I have tried using the SETOF operand in the CREATE FUNCTION > statement, and that allows me to return more than one row, > but haven't had any luck with specifying more than one return > type and hence more than one column. You don't specify more than one return type --- you specify one return type that is a composite type. Composite types are currently tied to tables; creating a table also creates a type that represents one of its rows. Thus create table foo (a int, b int); create function foobar (...) returns foo as ... Note that there are some annoying syntactic limitations on what you can actually *do* with a function returning tuples. We have plans to improve that situation in 7.2 or beyond, but for now, this facility isn't nearly as useful as one might think. regards, tom lane
В списке pgsql-general по дате отправления: