Hi Tom, Ref : Thursday, March 29, 2001 1:41:49 AM TL> Your trigger will obviously fail to generate unique keys if two TL> transactions are running concurrently, since any two transactions TL> started in the same minute will generate the same initial key, TL> and if they are running concurrently then neither will see the other's TL> entry in the table. Given that, I don't know why you're bothering. TL> Why don't you use a sequence object to generate the unique keys? I thought I could not do something like : a table with sequence with before-insert-trigger that would define a field based on the already-assigned-sequence number. I tried, it works perfect and no more errors. Again, again, again, many thanks. TL> (The internal queries of the trigger will appear in the log only when TL> compiled, ie, first time through that line in a particular backend.) Did not know that. Precious information ! -- Jean-Christophe Boggio [EMAIL PROTECTED] Independant Consultant and Developer Delphi, Linux, Perl, PostgreSQL ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly