From: Luca Rasconi <luca.rasconi@students.cefriel.it>
To: pgsql-sql@postgresql.org
Cc: luca.rasconi@students.cefriel.it
Subject: FW: help with serial
Date: Mon, 20 Jun 2005 11:33:51 +0200
Message-ID: <000901c5757b$2b3b7030$19040a0a@cefriel.it> (raw)
Hi all,
There's a behaviour I can't understand!!!!
There is table TABLE_A with 3 columns (uid, id, session) where uid is
the pk and the data type is serial.
There is table TABLE_B with 3 columns (uid, ts_col, col) where uid is
the pk.
On table TABLE_A I have a rule on insert like this:
CREATE OR REPLACE RULE r1 AS
ON INSERT TO TABLE_A DO INSERT INTO TABLE_B (uid)
VALUES ((new.uid));
Till now. ok.
When I do an insert
insert into TABLE_A ("id", "session") values (7, 'aaaaaaaaaaaaa');
I have this row,
In table TABLE_A
37; 7; "aaaaaaaaaaaaa"
while in table TABLE_B
38; ""; ""
how is it possible, why in a table 37 and in the other 37 + 1?
Thank you,
Luca
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: luca.rasconi@students.cefriel.it
Subject: Re: FW: help with serial
In-Reply-To: <000901c5757b$2b3b7030$19040a0a@cefriel.it>
* 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