|Subject||Re: [firebird-support] Knowing the previous rows|
|Author||Walter R. Ojeda Valiente|
Yes, of course that I can use triggers but that will have 2 problems:
1. Just will work with *new* data, not with the old ones. The data commited or rolled back *before* I write the triggers will be ignored.
2. With a database trigger I can know if a transaction has ends with a COMMIT or a ROLL BACK but not which table and which rows were used. If I write table's triggers then I will need to write a lot of them. If the database has 216 tables then I will need to write 216 triggers.
The idea is to know how many garbage a table has. Or several tables. Or the whole database.
On Fri, Aug 7, 2015 at 1:32 AM, liviuslivius liviuslivius@... [firebird-support] <firstname.lastname@example.org> wrote:
Hi,What about triggers?Regards,Karol Bieniaszewski
-------- Oryginalna wiadomość --------
Od: "'Walter R. Ojeda Valiente' sistemas2000profesional@... [firebird-support]" <email@example.com>
Data: 06.08.2015 20:12 (GMT+01:00)
Temat: [firebird-support] Knowing the previous rows
Hello everbodyAlways that a transaction that did an UPDATE ends with a COMMIT or a ROLLBACK this left back a row.So, my question is: There is some way to know those previous rows?This can be very useful for me because I shall know how many garbage a table has.For example, if a row has the ID 1234, it would be great a SELECT which show me something like that:1234 INSERT COMMIT1234 UPDATE COMMIT1234 UPDATE ROLLBACK1234 UPDATE COMMIT1234 UPDATE COMMIT1234 UPDATE COMMITSaying me some "story" of that row.Is that possible?Thanks in advance.Greetings.Walter.