Re: [BUGS] create OR REPLACE rule bug

2005-11-05 Thread Tom Lane
"Mikael Carneholm" <[EMAIL PROTECTED]> writes: > However, the rule does not work as expected (but I have been warned, see > http://archives.postgresql.org/pgsql-general/2005-10/msg01902.php) Once you do the DELETE, there is no OLD row anymore, so there is nothing for the INSERT to do. You might

Re: [BUGS] create OR REPLACE rule bug

2005-11-05 Thread Tom Lane
"Mikael Carneholm" <[EMAIL PROTECTED]> writes: > Ie, the "OR REPLACE" token is broken in that is doesn't work with > multiple commands (semicolons?) None of these examples fail for me, in any PG version back to 7.3. I speculate that the problem is in whatever client-side software you are using (wh

Re: [BUGS] create OR REPLACE rule bug

2005-11-05 Thread Mikael Carneholm
Forget that, is seems as a EMS PostgreSQL Manager bug (no problem creating the rule when executed from the pgAdmin III Query tool) However, the rule does not work as expected (but I have been warned, see http://archives.postgresql.org/pgsql-general/2005-10/msg01902.php) insert into parttest.mas

[BUGS] create OR REPLACE rule bug

2005-11-05 Thread Mikael Carneholm
I believe this is a bug: -- OR REPLACE present create or replace rule "mastertab_jan05_update" as on update to mastertab where (NEW.datecol < '20050101' or NEW.datecol >= '20050201') and (OLD.datecol >= '20050101' and OLD.datecol < '20050201') do instead ( -- multiple commands delet