On Thu, Aug 17, 2006 at 10:39:14PM -0400, Alvaro Herrera wrote:
> Another question.  The patch does a lot of scanning of the range table
> searching for specific aliases for things -- usually for *NEW* or *OLD*,
> but also to get the entry for the view we are modifying, etc.  This
> seems pretty fragile -- it breaks if I create a table named *OLD*, for
> example.  Is this acceptable?
> 
> alvherre=# create table "*OLD*" (a int);
> CREATE TABLE
> alvherre=# create view aaa as select * from "*OLD*";
> ERROR:  could not open relation with OID 0
> 
> On the other hand it doesn't break CVS tip at all, i.e. I can perfectly
> create the view and it works.  (I can even call it "*NEW*").

If we're going to allow this we should add a regression test for it,
since this seems like something that's likely to break.

Personally, I'd just say you can't name (or alias) something as "*OLD*"
or "*NEW*" and be done with it.
-- 
Jim C. Nasby, Sr. Engineering Consultant      [EMAIL PROTECTED]
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to