pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Damon Cokenias <lists@mtn-palace.com>
To: pgsql-general@postgresql.org
Subject: View INSERTs not returning OID in Postgres 7.2.1
Date: Wed, 10 Apr 2002 14:40:15 -0700
Message-ID: <p04310112b8da5fa05391@[10.0.1.9]> (raw)
In-Reply-To: <20020319155803.G37657-100000@megazone23.bigpanda.com>
References: <20020319155803.G37657-100000@megazone23.bigpanda.com>

I recently moved from 7.1.3 to 7.2.1.  In doing so, my application broke.  It relies on INSERT returning the OID of the inserted row, even if the INSERT was on a view.  I saw a note in the 7.2.1 notes about fixing a problem in this area, perhaps more needs to be done?

Example: 

acropolis=# create table shad (a integer);
CREATE
acropolis=# create view shadview as select * from shad;
CREATE
acropolis=# create rule shadview_insert as on insert to shadview do instead insert into shad values (new.a);
CREATE

acropolis=# insert into shad values (1);
INSERT 3876425 1

acropolis=# insert into shadview values (2);
INSERT 0 0

acropolis=# select * from shad;
 a 
---
 1
 2
(2 rows)

---------------

Shouldn't the second INSERT return an OID as well?

Thanks,

-Damon



view thread (2+ messages)  latest in thread

Message-ID: <p04310112b8da5fa05391@[10.0.1.9]>
Permalink:  ../p04310112b8da5fa05391@%5B10.0.1.9%5D/
Also on:    postgresql.org/message-id/p04310112b8da5fa05391@[10.0.1.9]

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lists@mtn-palace.com, pgsql-general@postgresql.org
  Subject: Re: View INSERTs not returning OID in Postgres 7.2.1
  In-Reply-To: <p04310112b8da5fa05391@[10.0.1.9]>

* 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