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

Re: 8.1 and syntax checking at create time

From: Matt Miller <mattm(at)epx(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:43:45
Message-ID: 1125517425.3640.34.camel@dbamm01-linux (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 2005-08-31 at 15:29 -0400, Tom Lane wrote:
> Matt Miller <mattm(at)epx(dot)com> writes:
> > 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 ;

Point taken.

PL/SQL requires all DDL to be dynamic SQL.  For example:

	execute immediate 'drop table foo';

The stuff inside the string is pretty-much ignored at compile time.

Maybe, then, my idealized PL/pgSQL compiler always allows DDL to
reference any object, but DML is checked against the catalog.


In response to

Responses

pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2005-08-31 19:58:17
Subject: Re: 8.1 and syntax checking at create time
Previous:From: Jim C. NasbyDate: 2005-08-31 19:38:16
Subject: Re: 8.1 and syntax checking at create time

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