Re: very basic SQL question - Mailing list pgsql-general

From Sam Mason
Subject Re: very basic SQL question
Date
Msg-id 20101123123458.GH6225@samason.me.uk
Whole thread Raw
In response to very basic SQL question  (Dan Kortschak <dan.kortschak@adelaide.edu.au>)
List pgsql-general
On Tue, Nov 23, 2010 at 02:09:19PM +1030, Dan Kortschak wrote:
> I want to be able to insert,
> uniquely, biological sequences into a table returning the sequence id -
> this part is fine. However, if the sequence already exists in the table
> I want to return to id.

The term you're looking for is "UPSERT", the following looks relevant:

  http://stackoverflow.com/questions/1109061/insert-on-duplicate-update-postgresql

--
  Sam  http://samason.me.uk/

pgsql-general by date:

Previous
From: Robert Gravsjö
Date:
Subject: Re: Debug advice when postgres connection maxing out
Next
From: Vick Khera
Date:
Subject: Re: Connection pool