Subject AW: [firebird-support] firebird and a temporary data
Author Steffen Heil

You can track the current_timestamp with each record inserted.
Then you can create a view that you use instead of that table that gets its
content from a stored procedure, that on its own first removes every "old"
record and then dumps the remaining rows.

This will keep records in the database longer than required but they will be
cleared during next access and you will never incorrectly seen them in your

Two more hints:
- Call the cleanup-code before any backup.
- I am not sure, but I think I remember that current_timestamp is fixed
during a transaction. [Anyone correct my, if I am wrong, please.] So your
timeout shoud be something like the time you want to keep the data + the
duration of the longest expected transaction.


> -----Urspr√ľngliche Nachricht-----
> Von: [mailto:firebird-
>] Im Auftrag von ik
> Gesendet: Montag, 24. Mai 2010 14:16
> An:
> Betreff: [firebird-support] firebird and a temporary data
> Hello list,
> I have a requirement to save data that will be shared by few processes for
> X amount of time, like 5 minutes or 20 minutes etc...
> Because I use Firebird on this project, and it can help me also remove
> race condition on such information I'm saving, I wish to create a table
for it in
> the database.
> Is there a way in Firebird to tell it to store information only for
> amount of time (the table should remain, but not the content), so every X
> amount of time from insert it will delete all of the data that are 5
minutes old
> and older, or should I create a kind of daemon in Linux for it and do it
> ?
> Thanks,
> Ido
> [Non-text portions of this message have been removed]
> ------------------------------------
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++
> Visit and click the Resources item on the main
> (top) menu. Try Knowledgebase and FAQ links !
> Also search the knowledgebases at
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++
> Yahoo! Groups Links

[Non-text portions of this message have been removed]