Re: CREATE TYPE in Postgres 7.3.4

From: Alex Page <alex(dot)page(at)cancer(dot)org(dot)uk>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE TYPE in Postgres 7.3.4
Date: 2003-12-02 17:27:59
Message-ID: 20031202172759.GV22296@halcyon.ox.icnet.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 27, 2003 at 07:48:46AM -0800, Joe Conway wrote:
> Alex Page wrote:

> [...creates enum_gender_in and enum_gender_out as PL/pgSQL functions...]

> According to the docs, you cannot use PL/pgSQL functions for I/O
> conversion functions. See
> http://www.postgresql.org/docs/current/static/plpgsql.html#PLPGSQL-OVERVIEW
> where it says:
> "Except for input/output conversion and calculation functions for
> user-defined types, anything that can be defined in C language
> functions can also be done with PL/pgSQL."

Fair enough; I was looking at the reference manual for 7.3, which
doesn't mention this limitation under either CREATE TYPE or CREATE
FUNCTION. This has changed in 7.4, where the documentation for CREATE
TYPE reads:

"The support functions input_function and output_function are required,
while the functions receive_function and send_function are optional.
Generally these functions have to be coded in C or another low-level
language."

Alex
--
Mail: Alex Page <alex(dot)page(at)cancer(dot)org(dot)uk>
Real: Systems/Network Assistant, Epidemiology Unit, Oxford
Tel: 01865 302 223 (external) / 223 (internal)
PGP: 8868 21D7 3D35 DD77 9D06 BF0A 0746 2DE6 55EA 367E

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Franco Bruno Borghesi 2003-12-02 17:31:11 Re: how many quotes?
Previous Message Alex Page 2003-12-02 17:15:47 Re: CREATE TYPE in Postgres 7.3.4