Re: Proposal: stand-alone composite types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: stand-alone composite types
Date: 2002-08-10 04:52:57
Message-ID: 20912.1028955177@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Joe Conway writes:
>> 3. Modify CREATE FUNCTION to allow the implicit creation of a dependent
>> composite type, e.g.:

> Forgive this blunt question, but: Why?

> Of course I can see the answer, it's convenient, but wouldn't the system
> be more consistent overall if all functions and types are declared
> explicitly?

I was wondering about that too, in particular: what name are you going
to give to the implicit type, and what if it conflicts?

The already-accepted mechanism for anonymous function-result types for
RECORD functions doesn't have that problem, because it has no need to
create a catalog entry for the anonymous type. But I'm not sure what
to do for record types that need to be present in the catalogs.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-08-10 05:04:24 Re: [GENERAL] workaround for lack of REPLACE() function
Previous Message Tom Lane 2002-08-10 04:49:17 Re: Proposal for psql wildcarding behavior w/schemas

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2002-08-10 05:04:24 Re: [GENERAL] workaround for lack of REPLACE() function
Previous Message Alvaro Herrera 2002-08-10 03:46:13 Re: adding PGPASSWORDFILE to libpq