Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 9885A477244 for ; Thu, 13 Jun 2002 16:06:40 -0400 (EDT) Received: from linuxmail.lgsinc.com (unknown [12.22.4.163]) by postgresql.org (Postfix) with ESMTP id 3FA6A476EBC for ; Thu, 13 Jun 2002 15:58:41 -0400 (EDT) Received: from timetop ([10.13.15.254]) by linuxmail.lgsinc.com (8.11.0/8.8.7) with SMTP id g5DJvr115647 for ; Thu, 13 Jun 2002 12:57:54 -0700 Date: Thu, 13 Jun 2002 12:48:35 -0700 From: Tim Ellis To: pgsql-admin@postgresql.org Subject: Triggers... Questions... Yes. Message-Id: <20020613124835.6e182cd4.Tim.Ellis@gamet.com> Organization: Gamet X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i586-mandrake-linux-gnu) WerdupHomey: 3.14159265358979323 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/90 X-Sequence-Number: 4525 I just used Dezign for Databases and created a simple table in what it claimed was "ANSI Level 2" compliance with a one-up "autonum" column. It spewed forth the following code: -- file generated by "dezign for databases" -- create-date :6/13/2002 -- create-time :10:29:56 am -- project-name :not yet specified -- project-author :not yet specified create table transaction(autonum integer); create trigger transaction_autonum_inc before insert on transaction referencing new as n for each row set (n.autonum) = (select (max(autonum),0) + 1 from transaction); Postgres (as you might suspect) didn't like it. Looking at the Postgres "create trigger" syntax, there is nothing about "referencing X as Y" being a possible phrase. Is the problem in: 1. Dezign for Databases, this really isn't ANSI Level 2, 2. Postgres, it doesn't (yet) support this level of functionality, but should, or 3. Me, I'm mixing up ANSI Level 2 and ANSI SQL '92, Postgres doesn't now and has no plans to support ANSI Level 2 SQL ??? Thanks, Tim Ellis DBA, Gamet