Re: [HACKERS] bugzilla.pgaccess.org - Mailing list pgsql-interfaces

From Jan Wieck
Subject Re: [HACKERS] bugzilla.pgaccess.org
Date
Msg-id 3D2E4317.B9827615@Yahoo.com
Whole thread Raw
Responses Re: [HACKERS] bugzilla.pgaccess.org  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-interfaces
Christopher Kings-Lynne wrote:
> 
> > The Bugzilla project plans to support PostgreSQL in one of their future
> > releases, but this requires functionality in PostgreSQL, that is not
> > even scheduled for 7.3. So the availability of a supported PostgreSQL
> > port of Bugzilla is unpredictable at this time.
> 
> I think he said that they needed DROP COLUMN functionality, which is being
> worked on for 7.3.  (Although I haven't had time to work on it for a few
> days)

DROP COLUMN is the one we might solve in 7.3. ALTER COLUMN ...
TYPE was mentioned too and I don't know when or how we will have
that one.

REPLACE INTO is one more. Though you can work around it. If you
setup a BEFORE INSERT trigger, in which you do a table lock, then
try to UPDATE an existing row with NEW's key. If that succeeds,
you return NULL, suppressing the INSERT. If it fails, you return
NEW letting the INSERT happen. The table lock (what Bradley
called "heavy locking") is required because otherwise someone can
sneak in between your update attempt and letting the INSERT
happen, getting exactly the same result and ... boom, duplicate
key error.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. #
# Let's break this rule - forgive
me.                                  #
#==================================================
JanWieck@Yahoo.com #


pgsql-interfaces by date:

Previous
From: Jan Wieck
Date:
Subject: Re: bugzilla.pgaccess.org
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] bugzilla.pgaccess.org