[Zope] Testing for the existence of a unique key

Teodor Cimpoesu teo@digiro.net
Mon, 20 Dec 1999 14:20:59 +0200


Timothy Grant wrote:
> 
> Hi gang,
> 
> I have a PostgreSQL database that I'm connected to.
> 
> It has a unique key
> 
> If I use and INSERT to insert a new record all works as expected. If I
> attempt to insert a non-unique key, I get NO exception, NO error, just
> Netscape popping up a "Response contained no data" dialogue box.
> 
> Am I correct in my assumption that the DA for PostgreSQL does not throw
> exceptions of this nature, and that I will have to run a SELECT to see
> if the record exists, then selectively run the INSERT based on the
> results of the SELECT?
> 
> I have gone wading through the DA code in an attempt to figure this out,
> but it exceeds my understanding of what's going on.
> 
> Any assistance would be greatly appreciated.

Just a challange :-) are you sure it's unique?
Can you insert a value by hand using psql client?
-- 
CIMPOESU Teodor, Web Programmer

@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ teo@digiro.net , +(401)-330.47.28

official home page ~ http://www.digiro.net/
Internet  web page ~ http://internet.digiro.net/