From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Marin D <marin@cybernet.bg>
To: Jerome ALET <alet@unice.fr>
Cc: patrice@idf.net
Cc: pgsql-sql@postgreSQL.org
Subject: RE: [SQL] nextval
Date: Thu, 28 May 1998 09:49:16 -0500
Message-ID: <F10BB1FAF801D111829B0060971D839F2AAE70@cpsmail> (raw)
> 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
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: djackson@cpsgroup.com, marin@cybernet.bg, alet@unice.fr, patrice@idf.net
Subject: RE: [SQL] nextval
In-Reply-To: <F10BB1FAF801D111829B0060971D839F2AAE70@cpsmail>
* 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