pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Molnar Laszlo <molnar.laszlo@richter.hu>
To: pgsql-sql@postgresql.org
Subject: [SQL] input function problem for user type array
Date: Sat, 18 Sep 1999 10:39:29 +0200
Message-ID: <37E34FC1.CF42D25E@richter.hu> (raw)


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



Message-ID: <37E34FC1.CF42D25E@richter.hu>
Permalink:  ../37E34FC1.CF42D25E@richter.hu/
Also on:    postgresql.org/message-id/37E34FC1.CF42D25E@richter.hu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: molnar.laszlo@richter.hu
  Subject: Re: [SQL] input function problem for user type array
  In-Reply-To: <37E34FC1.CF42D25E@richter.hu>
  References: <37E34FC1.CF42D25E@richter.hu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox