[SQL] input function problem for user type array

From: Molnar Laszlo <molnar(dot)laszlo(at)richter(dot)hu>
To: pgsql-sql(at)postgresql(dot)org
Subject: [SQL] input function problem for user type array
Date: 1999-09-18 08:39:29
Message-ID: 37E34FC1.CF42D25E@richter.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 1999-09-18 14:23:32 Re: [SQL] Converting an existing table?
Previous Message sniper7107 1999-09-18 03:26:52 20