Inserting / Selecting / Getting the Index.

From: Daron Ryan <daron(dot)ryan(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Inserting / Selecting / Getting the Index.
Date: 2011-05-15 13:43:31
Message-ID: 4DCFD883.1050601@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with just 2 columns, 1 for a character array and one an
integer index. I need to process a string such as to find out the index
for it in the table if it is already there or insert it and then find
out it's index which is auto generated otherwise. Is there a way to do
this in a single step?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tarlika Elisabeth Schmitz 2011-05-15 15:56:10 Role for CSV import
Previous Message InterRob 2011-05-14 18:25:12 Re: UNIQUE constraint on KEY VALUE PAIRS