Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: CURRENT/OLD keywords still broken - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CURRENT/OLD keywords still broken
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: CURRENT/OLD keywords still broken  (Bruce Momjian <[email protected]>)
Responses Re: CURRENT/OLD keywords still broken
List pgsql-hackers
Bruce Momjian <[email protected]> writes:
> That was me.  The old code did old -> current, so I changed it to do
> current -> old.  How else can I fix this?  Attached is the old patch.

But CURRENT was strictly an internal token name, not a string the user
could actually see.  So there's no need to have
+     /* for portability with old rules bjm 2000-06-12 */
+     {"current", OLD},

The only way that there would be a compatibility problem would be if
ruleutils.c had been set up to print CURRENT, but it wasn't:

*** 1278,1284 ****                                        quote_identifier(rte->relname));                   else if
(!strcmp(rte->ref->relname,"*NEW*"))                       appendStringInfo(buf, "new.");
 
!                       else if (!strcmp(rte->ref->relname, "*CURRENT*"))                       appendStringInfo(buf,
"old.");                  else                       appendStringInfo(buf, "%s.",
 
--- 1278,1284 ----                                        quote_identifier(rte->relname));                   else if
(!strcmp(rte->ref->relname,"*NEW*"))                       appendStringInfo(buf, "new.");
 
!                       else if (!strcmp(rte->ref->relname, "*OLD*"))                       appendStringInfo(buf,
"old.");                  else
 

NEW and OLD are what the user see, and have been for awhile.  So there's
no compatibility issue here.
       regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: TOAST-table vacuuming (was Re: Idea for reducing pl anning time)
Next
From: "Oliver Elphick"
Date:
Subject: Re: 7.1 (current) unwanted NOT NULL constraint inserted