Subject RE: [ib-support] Maximal "size" of a PSQL code module?
Author Thomas Steinmaurer
Paul,

> > I've a pretty large (size of the source code) trigger, which
> > doesn't compile with the error message "Unexpected end of
> > command", but I'm sure that the source code is correct.
> >
> > I know I've somewhere read mentioning the maximal size of a
> > PSQL code module, but I can't remember exactly that limitation
> > (something around 64K?).
> >
> > Is it the size of the source code, the compiled BLR, the number
> > of lines ...? I'm using FB 1.0.2.
> >
>
> 48Kb of compiled BLR is the maximum.
>
> That may or may not be the _real_ maximum. One of the problems with the
> specifications is that they often quote theoretical limits. Often there
> are other practical limits that lower those limits.
>
> In any case triggers can call stored procedures.

Yes, I've used that approach (calling a stored procedure - which
simply executes an INSERT INTO - in the trigger) in the past, but
I moved back to executing the INSERT INTO statements in the
trigger direclty, due to reaching another limit, namely "request
size limit exceeded ...", when input parameters of the stored
procedure where declared as huge varchar parameters.

> You should be able to
> break the trigger up into chunks if you have hit the BLR limit.

Yep, though this is hard in my case, because the triggers are
created automatically, based on a given template.

The given error message "Unexpected end of command" in my previous
post is IMHO a bit misleading when I really reach a BLR limit,
because I would rather think, that the source of the trigger is
e.g. too big and therefore truncated before compiling (or something
similar).

Are you aware of any other size limits of triggers and stored
procedures, because the BLR limit is hard to measure, when one
tries to compile a huge trigger.

Any further ideas?

Thanks for your help!


Regards,
Thomas Steinmaurer
http://www.iblogmanager.com