[Zope] Testing for the existence of a unique key

Timothy Grant tjg@avalongroup.net
Fri, 17 Dec 1999 13:35:03 -0800


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.
-- 
Stand Fast,
    tjg.

Timothy Grant                     tjg@exceptionalminds.com
Chief Technology Officer          www.exceptionalminds.com
Red Hat Certified Engineer           office (503) 246-3630
Avalon Technology Group, Inc.           fax (503) 246-3124
>>>>>>>>>>Exceptional Minds, Innovative Products<<<<<<<<<<