Re: Inserting / Selecting / Getting the Index.

From: David Johnston <polobo(at)yahoo(dot)com>
To: Daron Ryan <daron(dot)ryan(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Inserting / Selecting / Getting the Index.
Date: 2011-05-15 15:56:52
Message-ID: 11A4B6E5-39B8-4B90-BDC2-3FB5F3678D5A@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Call a custom function that does what you asking and that returns the appropriate index value.

David J.

On May 15, 2011, at 9:43, Daron Ryan <daron(dot)ryan(at)gmail(dot)com> wrote:

> 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?
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2011-05-15 17:56:38 Re: Role for CSV import
Previous Message Tarlika Elisabeth Schmitz 2011-05-15 15:56:10 Role for CSV import