From: | "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735) |
Date: | 2002-08-30 01:28:08 |
Message-ID: | 20020830012809.80AEF1AFD@druid.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On August 29, 2002 03:37 pm, Tom Lane wrote:
> "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.
And gives a warning, right?
> > 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.
Yes, I see your point.
> 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.
OK but how about a little reward if they do. Do everything as we do now
except that if they wrap it in a transaction then they don't get the warning
unless they exit the transaction without completing the type? Some people
(e.g. me) like to code as if warnings were as bad as errors.
--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2002-08-30 01:29:45 | Re: SRF memory mgmt patch |
Previous Message | Tatsuo Ishii | 2002-08-30 01:25:48 | Re: SRF memory mgmt patch |