the oid is uknown during execution of rule..insert ? (psql ver 6.5.2) - Mailing list pgsql-sql

From Daniel Péder
Subject the oid is uknown during execution of rule..insert ? (psql ver 6.5.2)
Date
Msg-id 01BF15AB.D9AF52C0@Dan
Whole thread Raw
List pgsql-sql
mydb=> create table roid (roid oid, rtext text);
CREATE
mydb=> create table rtext ( rtext text );
CREATE
mydb=> create rule roidset as on insert to rtext do insert into roid values ( new.oid, new.rtext );
CREATE
mydb=> insert into rtext values('text1');
INSERT 17681 1
mydb=> insert into rtext values('text2');
INSERT 17683 1
mydb=> insert into rtext values('text3');
INSERT 17685 1
mydb=> select oid,* from rtext; oid|rtext
-----+-----
17681|text1
17683|text2
17685|text3
(3 rows)

mydb=> select oid,* from roid; oid|roid|rtext
-----+----+-----
17680|    |text1
17682|    |text2
17684|    |text3
(3 rows)



pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [SQL] Money variable
Next
From: Ottawa Online Digital Development
Date:
Subject: (no subject)