Subject Re: timestamp trigger?
Author Adam
--- In firebird-support@yahoogroups.com, "Fernando Salaices"
<fsalaices@...> wrote:
>
> a generator? Can a generator be created that returns the current date?

No, a generator is a sequence in SQL terms. It will give you a number
that has never been and never will be given to anyone else (*1)

Ann was most likely assuming that you want to flag these records with
a changed date so that you can query all records that have been
changed since last time you ran the query.

The problem with using timestamps for such a purpose is their
precision (current_timestamp only returns to the second) and the fact
they are not unique.

Using generators to provide an update number allows this to be handled
better.

Adam

(*1) providing no-one ever resets or decrements it.