From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Can I assume there's only one _RETURN rule? |
Date: | 2006-08-24 09:06:55 |
Message-ID: | 20060824090655.GB73562@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Schiltknecht | 2006-08-24 09:18:35 | Re: Replication |
Previous Message | Jim C. Nasby | 2006-08-24 09:00:03 | Re: An Idea for planner hints |