pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Stone <mstone+postgres@mathom.us>
To: pgsql-performance@postgresql.org
Subject: Re: insert without oids
Date: Fri, 13 Jan 2006 17:48:01 -0500
Message-ID: <20060113224800.GJ1408@mathom.us> (raw)
In-Reply-To: <1137187755.2509.6.camel@localhost.localdomain>
References: <20060113201011.GI1408@mathom.us>
	<1137187755.2509.6.camel@localhost.localdomain>

On Fri, Jan 13, 2006 at 04:29:15PM -0500, Neil Conway wrote:
>There's really no additional operations required:
>INSERT INTO t2 VALUES (currval('t1_id_seq'), ...);
>You need a separate SELECT if you want to use the generated sequence
>value outside the database, 

That would, of course, be the goal. IOW, if you have a table which has
data which is unique only for the serial column, the old syntax provided
a way to refer to the newly inserted row uniquely without any additional
operations. 

>although the INSERT ... RETURNING extension will avoid that 

That sounds promising. I'll have to put the TODO list on my todo list.
:)

Mike Stone



view thread (4+ messages)

Message-ID: <20060113224800.GJ1408@mathom.us>
Permalink:  ../20060113224800.GJ1408@mathom.us/
Also on:    postgresql.org/message-id/20060113224800.GJ1408@mathom.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-performance@postgresql.org
  Cc: mstone+postgres@mathom.us
  Subject: Re: insert without oids
  In-Reply-To: <20060113224800.GJ1408@mathom.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