Re: How to create a type ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to create a type ?
Дата
Msg-id 13870.982166422@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to create a type ?  (Ines Klimann <Ines.Klimann@liafa.jussieu.fr>)
Список pgsql-sql
Ines Klimann <Ines.Klimann@liafa.jussieu.fr> writes:
> I have tried this :
> ----------------------------------
> create function personne_in(text)
> returns personne
> as 'select $1;'
> language 'sql';

> create function personne_out(text)
> returns text
> as 'select $1;'
> language 'sql';

> create type personne (
> internallength = variable,
> input = personne_in,
> output = personne_out
> );
> ---------------------------------
> but it is full of mistakes.

Can't do it that way, because SQL functions can't produce or consume
the plain C strings that input/output conversion functions have to
deal with.  There's really no way to write an input or output function
except in C.
        regards, tom lane


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

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Re: createuser problem
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: how to select * from database1 table,database2 table