Re: Passing RECORD variable from func1() to func2()

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Passing RECORD variable from func1() to func2()
Дата
Msg-id 20040906212331.GB24886@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Passing RECORD variable from func1() to func2()  ("Henry Combrinck" <henry@metroweb.co.za>)
Список pgsql-general
On Mon, Sep 06, 2004 at 10:39:54PM +0200, Henry Combrinck wrote:

> Can you give an example of what a "named rowtype" is?  Are you refering to
> creating some kind of custom TYPE, and then passing that to
> func2(custom_type_row)?

You can use a table's rowtype, that is, a type that has the name of the
table and the same column types.  Or you can create a "standalone type" with

CREATE TYPE foo AS (f1 int, f2 text, ...)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Find a bug in a program, and fix it, and the program will work today.
Show the program how to find and fix a bug, and the program
will work forever" (Oliver Silfridge)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Passing RECORD variable from func1() to func2()
Следующее
От: "NTPT"
Дата:
Сообщение: Re: Index on TEXT versus CHAR(32)... fast exact TEXT matching