[SQL] input function problem for user type array

Поиск
Список
Период
Сортировка
От Molnar Laszlo
Тема [SQL] input function problem for user type array
Дата
Msg-id 37E34FC1.CF42D25E@richter.hu
обсуждение исходный текст
Список pgsql-sql
Hello,

I have some problem with my user type array.
I have defined the following:

CREATE FUNCTION atom_in(opaque)  RETURNS atom  AS '/var/lib/pgsql/i_o/atom_input.so'  LANGUAGE 'c';

CREATE FUNCTION atom_out(opaque)  RETURNS opaque  AS '/var/lib/pgsql/i_o/atom_input.so'  LANGUAGE 'c';

CREATE TYPE atom (  internallength = 60,  input = atom_in,  output = atom_out
);

CREATE TYPE molecule (  internallength = variable,  element = atom,  input = atom_in,  output = atom_out
);


CREATE TABLE mols (mol molecule);   

My question is: do i need an input function for my array type (molecule)
or the array_in function call my input function (atom_in) for every
array element successively?

Where can I see an example for user defined array type input and output
functions?

Thanx in advance for the answers,

Laszlo Molnar
GEDEON RICHTER Ltd.
HUNGARY


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Converting an existing table?
Следующее
От: Margarita Barvinok
Дата:
Сообщение: Where to find the patch?