pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Péder <dpeder@infoset.cz>
To: 'pgsql-hackers@postgresql.org' <pgsql-hackers@postgresql.org>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: the oid is uknown during execution of rule..insert ? (psql ver 6.5.2)
Date: Wed, 13 Oct 1999 18:50:40 +0100
Message-ID: <01BF15AB.D9AF52C0@Dan> (raw)

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)




Message-ID: <01BF15AB.D9AF52C0@Dan>
Permalink:  ../01BF15AB.D9AF52C0@Dan/
Also on:    postgresql.org/message-id/01BF15AB.D9AF52C0@Dan

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dpeder@infoset.cz, pgsql-hackers@postgresql.org
  Subject: Re: the oid is uknown during execution of rule..insert ? (psql ver 6.5.2)
  In-Reply-To: <01BF15AB.D9AF52C0@Dan>
  References: <01BF15AB.D9AF52C0@Dan>

* 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