Subject Emulating table skipping for gbak under Firebird 2.5
Author
Gbak supports skipping certain tables as of Firebird 3.0. For the time being, I'm stuck with 2.5 but I'd like to achieve the same thing, in a less elegant fashion (read: with a hack) if need be.

My idea was to have a TRANSACTION START trigger that checks if the connection is from gbak (dedicated database user) and if so, deletes all data from the table. Then, in TRANSACTION COMMIT, again check the user and, if it's gbak, raise an exception to force a rollback. To my surprise, however, the table still ends up empty in the backed up database even though the exception is thrown. Perhaps gbak catches it...? What's even stranger to me is that gbak's transaction does not seem to be isolated, because while gbak is still running, I can already see the result of the TRANSACTION START trigger from a new transaction.

Another option would be to alter the resulting XDR data, but I haven't found a specification yet based on which I could reliably do that.