Skip site navigation (1) Skip section navigation (2)

Re: 8.1 and syntax checking at create time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matt Miller <mattm(at)epx(dot)com>
Cc: josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org,Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>,Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: 8.1 and syntax checking at create time
Date: 2005-08-31 19:29:30
Message-ID: 4058.1125516570@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Matt Miller <mattm(at)epx(dot)com> writes:
> On Wed, 2005-08-31 at 11:59 -0700, Josh Berkus wrote:
>> If a table does not exist, we don't want to check for that and bounce
>> the function; possibly the function will only be called in a context
>> where the table does exist.

> I am thankful that Oracle's PL/SQL compiler checks these things for me.
> I don't remember the last time I intended to write code that referenced
> something that did not exist in the database.

Almost every day, people try to write stuff like

	CREATE TEMP TABLE foo ... ;
	INSERT INTO foo ... ;
	etc etc
	DROP TABLE foo ;

in plpgsql functions.  Now I know that that doesn't work very well,
but we should be going in the direction of fixing it to work well,
not installing error checks that are guaranteed to make it fail.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tony CadutoDate: 2005-08-31 19:35:21
Subject: Re: 8.1 and syntax checking at create time
Previous:From: Josh BerkusDate: 2005-08-31 19:25:17
Subject: Re: 8.1 and syntax checking at create time

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group