pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Damon Cokenias <lists@mtn-palace.com>
Cc: pgsql-general@postgresql.org
Subject: Re: View INSERTs not returning OID in Postgres 7.2.1
Date: Wed, 10 Apr 2002 22:10:07 -0400
Message-ID: <25094.1018491007@sss.pgh.pa.us> (raw)
In-Reply-To: <p04310112b8da5fa05391@[10.0.1.9]>
References: <20020319155803.G37657-100000@megazone23.bigpanda.com>
	<p04310112b8da5fa05391@[10.0.1.9]>

Damon Cokenias <lists@mtn-palace.com> writes:
> 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'm afraid you were relying on a coincidental artifact of the old
implementation, namely that you got back the command tag associated
with the last command to be physically executed.  The current code
is careful to return the command tag associated with the original
query (here, the insert into shadview) regardless of execution order
of additional queries executed by rules.  I'm not sure that we can fix
your problem without breaking other cases.

			regards, tom lane



view thread (2+ messages)

Message-ID: <25094.1018491007@sss.pgh.pa.us>
Permalink:  ../25094.1018491007@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25094.1018491007@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, lists@mtn-palace.com, pgsql-general@postgresql.org
  Subject: Re: View INSERTs not returning OID in Postgres 7.2.1
  In-Reply-To: <25094.1018491007@sss.pgh.pa.us>

* 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