pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Constraint problem
Date: Thu, 16 May 2002 13:49:18 -0700
Message-ID: <200205161349.18499.josh@agliodbs.com> (raw)
In-Reply-To: <20020516132750.P93696-100000@megazone23.bigpanda.com>
References: <20020516132750.P93696-100000@megazone23.bigpanda.com>


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@agliodbs.com
    and data management solutions 	(415) 565-7293
   for law firms, small businesses 	 fax 621-2533
    and non-profit organizations. 	San Francisco




view thread (13+ messages)  latest in thread

Message-ID: <200205161349.18499.josh@agliodbs.com>
Permalink:  ../200205161349.18499.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200205161349.18499.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, sszabo@megazone23.bigpanda.com
  Subject: Re: Constraint problem
  In-Reply-To: <200205161349.18499.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox