Rule flag in gram.y

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Rule flag in gram.y
Дата
Msg-id 200108031547.f73FlRj27120@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: Rule flag in gram.y  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: src/backend/parser/gram.y
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.238
diff -c -r2.238 gram.y
*** src/backend/parser/gram.y    2001/07/16 19:07:40    2.238
--- src/backend/parser/gram.y    2001/08/03 14:45:37
***************
*** 2720,2725 ****
--- 2720,2726 ----
                      n->instead = $12;
                      n->actions = $13;
                      $$ = (Node *)n;
+                     QueryIsRule=FALSE;
                  }
          ;


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dumpall problem in 7.1 and cvs
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Name for new VACUUM