[SQL] input function problem for user type array - Mailing list pgsql-sql

From Molnar Laszlo
Subject [SQL] input function problem for user type array
Date
Msg-id 37E34FC1.CF42D25E@richter.hu
Whole thread Raw
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Converting an existing table?
Next
From: Margarita Barvinok
Date:
Subject: Where to find the patch?