Re: Constraint problem

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Constraint problem
Date: 2002-05-16 20:49:18
Message-ID: 200205161349.18499.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Stephan,

> I unfortunately can't think of a good workaround. AFAICT, Unique should
> wait until after all of the updates but our implementation doesn't
> currently do so.
>
> Hopefully someone will have some ideas, because the best I can think of
> requires an additional full table scan to check uniqueness and the
> concurrency issues would be a bear.

Hmm ... I can put up with that, I think. This table doesn't get modified very
often, and I can afford to table-level lock it during modification.

However, I can't think of how I could implement a BEFORE ... FOR EACH
STATEMENT trigger that would check for duplicates in the final result. I can
only deal with one row at a time using the NEW record.

Suggestions?

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-05-16 21:29:50 How can I tell the performance difference?
Previous Message Joel Burton 2002-05-16 20:43:37 Re: SQL over my head...