Re: Rule flag in gram.y

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Rule flag in gram.y
Date: 2001-08-03 22:55:46
Message-ID: 26257.996879346@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> There is some code in gram.y that detects whether you are in a RULE so
> NEW/OLD can be detected. Seems the value is reset on parser start and
> set on RULE start, but not reset on rule and. A multi-query string
> could use NEW/OLD in the queries after the RULE even though they are
> invalid. The following patch fixes this by resetting the flag when the
> rule action happens.

I was about to say "fix ecpg's grammar too", but a quick look shows that
Michael was way ahead of the rest of us on this one ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Giles Lean 2001-08-04 00:56:57 Re: SIGCHLD handler in Postgres C function.
Previous Message Tom Lane 2001-08-03 22:48:05 Re: Name for new VACUUM