Re: Unique Indexes

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: ILove TheSpam <ilovethespam(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unique Indexes
Date: 2005-03-11 18:33:31
Message-ID: 20050311183331.GA45696@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 11, 2005 at 04:21:49PM +0000, ILove TheSpam wrote:

> My problem is that I want to:
> a) Be able to detect when an error occurs and be able to read that error
> b) Find out the FieldID for the row which already has the value in it. So
> if I try to enter 'blah' into FieldValue and it's already in the row with
> FieldID=3, I want the value 3 to be returned to me. I realise this can be
> done using a SELECT after the error, but I'd like to avoid that. I'm hoping
> Postgres itself has some way of detecting this sort of thing.

Could you describe the problem you're trying to solve? It might
be easier to help if we knew the ultimate purpose of what you're
trying to do. Something like "I want to do this because...."

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Randall Nortman 2005-03-11 18:43:21 Re: Best practices: Handling Daylight-saving time
Previous Message Steve Crawford 2005-03-11 18:22:06 Re: Best practices: Handling Daylight-saving time