pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. R. Van Hook <hook@lake-lotawana.mo.us>
To: pgsql-sql@postgresql.org
Subject: new rule syntax?
Date: Sun, 05 Feb 2006 06:00:18 -0600
Message-ID: <43E5E8D2.6020502@lake-lotawana.mo.us> (raw)

I have two tables defined as:
checks
        (ckid                int NOT null PRIMARY KEY,
         payto               text,
         notes               text,
         ckdate              date,
         printed             int  default 0,
         tdate               timestamp not null)
checkitems
        (item                int not null,
         ckid                int NOT null references checks,
         itemtype            int not null,
         amt                 numeric(7,3),
         primary key         (item, ckid))

in previous versions (<8.1) the following rule declaration seemed to 
work fine
 create rule checks_d0 as
     on delete to checks
        do delete from checkitems
           where ckid = checks.ckid;
in 8.1.2 I get

ERROR: missing FROM-clause entry from table "checks"

any idea?

-- 
Arthur R. Van Hook
      Mayor 
The City of Lake Lotawana

hook@lake-lotawana.mo.us

(816) 578-4704 - Home
(816) 578-4215 - City
(816) 564-0769 - Cell




view thread (5+ messages)  latest in thread

Message-ID: <43E5E8D2.6020502@lake-lotawana.mo.us>
Permalink:  ../43E5E8D2.6020502@lake-lotawana.mo.us/
Also on:    postgresql.org/message-id/43E5E8D2.6020502@lake-lotawana.mo.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: hook@lake-lotawana.mo.us
  Subject: Re: new rule syntax?
  In-Reply-To: <43E5E8D2.6020502@lake-lotawana.mo.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox