Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.8.8/8.7.5) with ESMTP id KAA19534 for ; Thu, 28 May 1998 10:49:42 -0400 (EDT) Received: by bjke.com; id KAA20562; Thu, 28 May 1998 10:48:03 -0400 (EDT) Received: from cpsmail.cpsgroup.com(144.210.12.11) by gauntlet.bjke.com via smap (3.2) id xmac20107; Thu, 28 May 98 10:47:32 -0400 Received: by cpsmail with Internet Mail Service (5.0.1458.49) id ; Thu, 28 May 1998 09:49:16 -0500 Message-ID: From: "Jackson, DeJuan" To: Marin D , Jerome ALET Cc: patrice@idf.net, pgsql-sql@postgreSQL.org Subject: RE: [SQL] nextval Date: Thu, 28 May 1998 09:49:16 -0500 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain > On Thu, 28 May 1998, Jerome ALET wrote: > > > > > Yes, I already know that solution, but I wondered why mine was bad > (the > > forgotten '') and finally I think I've found a (maybe already known) > bug > > in CREATE RULE (look at the results in my previous message). > > > > Who hasn't already found one? :) > > the man page for create_rule clearly says > > DESCRIPTION > The current rule system implementation is very brittle and > is unstable. Users are discouraged from using rules at > this time. > I wouldn't consider the results that Jerome is getting to be a bug. What is happening is that the RULE is inserting the new value into every row each time he inserts a new row. A test to verify that would be to insert two rows then a select and see if the behavior is consistent with your previous assumptions. Now with that said the solution would be to somehow limit your insert rule to the currently inserted row. I haven't played with rules enough (read: at all), so I can't give you the sql, but I bet it looks like a WHERE clause. Hope this helps, -DEJ