View INSERTs not returning OID in Postgres 7.2.1

From: Damon Cokenias <lists(at)mtn-palace(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: <>
Subject: View INSERTs not returning OID in Postgres 7.2.1
Date: 2002-04-10 21:40:15
Message-ID: p04310112b8da5fa05391@[10.0.1.9]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Bartley 2002-04-10 22:29:56 "Bad date external representation '2002-04-09 00:02:60.00+10'".
Previous Message will trillich 2002-04-10 21:38:54 Re: Regular Expression INTRO [long] [OT]

Browse pgsql-sql by date

  From Date Subject
Next Message gordoncl 2002-04-11 00:35:51 Functions in Postgres
Previous Message Jean-Luc Lachance 2002-04-10 16:30:00 Re: Postgresql goes into recovery mode ....