I have log tables of changes, with unique index (who,where,when).
The when field has date type. It stores the date+time until seconds.
It works well when I enter changes manually.
But if I want to log changes made by a query they can occur within a second, so the unique index causes an error.
I overcomed the difficulty using more fields in the index :
(who,where,when+key fields of the logged table).
I do not want to use counter field.
Is there any way to ask for hundreds or thousands of second from the system clock and form a more exact moment like 2002.10.09:09.26.10+12/100? [tt]
Ferenc Nagy
|\ /~ ~~|~~~ nagyf@alpha0.iki.kfki.hu Fax: (36-1)-392-2529 New!
| \ | | Institute of Isotope and Surface Chemistry
| \ | -+- 1525 Bp. POB 77. Tel. 36-1)-392-2550
| \| | `-' ' `-' "The goal of the life is the struggle itself"
[/tt]
The when field has date type. It stores the date+time until seconds.
It works well when I enter changes manually.
But if I want to log changes made by a query they can occur within a second, so the unique index causes an error.
I overcomed the difficulty using more fields in the index :
(who,where,when+key fields of the logged table).
I do not want to use counter field.
Is there any way to ask for hundreds or thousands of second from the system clock and form a more exact moment like 2002.10.09:09.26.10+12/100? [tt]
Ferenc Nagy
|\ /~ ~~|~~~ nagyf@alpha0.iki.kfki.hu Fax: (36-1)-392-2529 New!
| \ | | Institute of Isotope and Surface Chemistry
| \ | -+- 1525 Bp. POB 77. Tel. 36-1)-392-2550
| \| | `-' ' `-' "The goal of the life is the struggle itself"
[/tt]