Create rule weirdness
От | mpg4@duluoz.net |
---|---|
Тема | Create rule weirdness |
Дата | |
Msg-id | 20000112062533.29287.qmail@paradise.duluoz.net обсуждение исходный текст |
Список | pgsql-bugs |
If PostgreSQL failed to compile on your computer or you found a bug that is likely to be specific to one platform then please fill out this form and e-mail it to pgsql-ports@postgresql.org. To report any other bug, fill out the form below and e-mail it to pgsql-bugs@postgresql.org. If you not only found the problem but solved it and generated a patch then e-mail it to pgsql-patches@postgresql.org instead. Please use the command "diff -c" to generate the patch. You may also enter a bug report at http://www.postgresql.org/ instead of e-mail-ing this form. ============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name : Mike Glover Your email address : mpg4@duluoz.net System Configuration --------------------- Architecture (example: Intel Pentium) : i686-pc-linux-gnu Operating System (example: Linux 2.0.26 ELF) : Linux 2.1.12 PostgreSQL version (example: PostgreSQL-6.5.1): PostgreSQL-6.5.1 Compiler used (example: gcc 2.8.0) : gcc 2.7.2.3 Please enter a FULL description of your problem: ------------------------------------------------ >From the documentation: there is a current instance (for retrieves, updates and deletes) and a new instance (for updates and appends). my example below shows at least one situation where this is not the case -- a rule on delete seems to create a 'new' class but not a 'current' class. Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: ---------------------------------------------------------------------- (ent_base is an existing table with a column labeled eid, the do_ent_cleanup function exists) =>create rule cause_ent_cleanup as on delete to ent_base do select do_ent_cleanup (current.eid); ERROR: current: Table does not exist. =>create rule cause_ent_cleanup as on delete to ent_base do select do_ent_cleanup (new.eid); CREATE (the rule then performs as expected -- I haven't done extensive testing, however) If you know how this problem might be fixed, list the solution below: ---------------------------------------------------------------------
В списке pgsql-bugs по дате отправления: