Re: PL/PGSQL Record type question

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: PL/PGSQL Record type question
Дата
Msg-id E161951A-9DDA-4ADA-BC9F-A356B3919A95@pgedit.com
обсуждение исходный текст
Ответ на Re: PL/PGSQL Record type question  (Gábriel Ákos <akos.gabriel@i-logic.hu>)
Список pgsql-sql
You can use CREATE TYPE:

http://www.postgresql.org/docs/8.2/interactive/sql-createtype.html

Example from the documentation:

CREATE TYPE compfoo AS (f1 int, f2 text);


Then make your function return compfoo (or setof compfoo).
Alternately, you can define your function with out or in/out
parameters so you don't need the CREATE TYPE statement.




On May 11, 2007, at 10:42 AM, Gábriel Ákos wrote:

>> You might be looking for PostgreSQL RECORD data type.
>
> Thanks. Give me an example please. I saw the documentation already.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL



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

Предыдущее
От: Gábriel Ákos
Дата:
Сообщение: Re: PL/PGSQL Record type question
Следующее
От: "Collin Peters"
Дата:
Сообщение: Convert serial column to regular integer