Re[2]: Unexplained behaviour
От | Jean-Christophe Boggio |
---|---|
Тема | Re[2]: Unexplained behaviour |
Дата | |
Msg-id | 19927283859.20010330165656@thefreecat.org обсуждение исходный текст |
Ответ на | Re: Unexplained behaviour (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
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 cat@thefreecat.org Independant Consultant and Developer Delphi, Linux, Perl, PostgreSQL
В списке pgsql-general по дате отправления: