Geoff Worboys wrote:

I've been trying to track down exactly what the maximum size of a Firebird EVENT name is.

Experiment shows that POST_EVENT '....' allows 262 (ASCII) characters, 263 gives a truncation error.

But the documentation I've managed to track down gives variously 15 (IB6, gpre.h, FB Book), 31 (utl.cpp), 78 (FB v2.0 online manual).

I can't find anywhere in the FB release notes or changelog where the limit was ever changed from the official/original 15 characters, and I can't see a specific limit defined in the source.

Can anyone tell me what limit I should rely on? (I imagine 15 would be pretty safe, but a little more would be nice).

Vlad Khorsun answers:

Quick look at sources show that:

  1. isc_event_blockgds__event_block and isc_event_countsgds__event_counts make assumption that event name length is 1-byte wide, i.e. it encodedecode event intofrom event blocks using 1-byte length for names. This give us up to 255 bytes for name string.
  2. gds__event_block_aisc_event_block_a assume that event names is no more than 31. I.e. if application uses these API, it will be limited by 31 bytes names. Comments shows that XXX_a API's is used by ADA preprocessor.
  3. Event manager uses 2-byte for name length.
  4. Engine make no guess about event name length, at least i see no such code.

So, i'd say you may use events with names up to 255 bytes (assume you not using XXX_a API's). But, again, it was a quick look and i could miss something.

Like this post? Share on: TwitterFacebookEmail

Related Articles


Firebird Community



Gems from Firebird Support list