Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735)
Date: 2002-08-29 19:37:29
Message-ID: 25987.1030649849@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"D'Arcy J.M. Cain" <darcy(at)druid(dot)net> writes:
> One thing I do see though is that there is a completion issue.

Well, (a) the shell type can't be used for anything till you turn it
into a real type, and (b) the completion issue already exists, and has
for a long time; you've always been able to create a shell type by using
a not-yet-known type name as the return type of a function. It's just
not well documented.

> 1. An incomplete CREATE TYPE raises an error if not inside a transaction
> block.

I have no intention of implementing this. (1) It wouldn't really
simplify life anyway, since we'd still need all the same guard code to
prevent you from using the shell type within the creating transaction.
(2) It would break existing pg_dump scripts, which don't know they'd
need to do this.

Wrapping the sequence inside a transaction is a good practice, but
I don't feel that we have to try to force good practice on people.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-29 19:55:27 Re: README.tsearch.diff for CVS
Previous Message Bruce Momjian 2002-08-29 19:37:26 Re: tweaking MemSet() performance