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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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