Subject Re: [firebird-support] Stored Procedure Name : 32 chars max in Firebird 2.x ?
Author Martijn Tonies

> I'm wondering whether the 32 characters limit on stored procedure names
> still exists in firebird 2.0...

31 characters really, yes, it still exists.

>The fb2 release notes has nothing to say
> on the subject. This is not a big showstopper or anything, just that if
> you have tons of stored procedures, creating a meaningful name in
> 32chars is... um... painful :)
> At some point i was even thinking of creating a translation table to
> store 'short sp name' (ex: 'sp_0001', 'sp_0002', 'sp_0003', keep it
> under 32chars ) vs 'full/real sp name' (ex:
> 'sp_get_actual_payment_allocation_from_finance_department')
> and devise a way to translate/resolve the names somehow during sp calls.

Nooo, you shouldn't, IMO. Makes development a pain.

> Probably not worth the effort, though... because of several drawbacks:
> - no compile time syntax checking
> - slower since every sp call involves a table lookup
> Anyway, any other info/advice/tricks/workarounds are very much
> appreciated.

Be creative :-)

At a company I worked for, we didn't use SP_001 etc, but what we did
use for tables (Oracle has a similar limit of 30 chars for all object names)
was a 4 character code for each table that made somewhat sense, but
keep table names in full.

PERSON = PRSN (and keep those in a diagram next to the normal
table names)

All FKs would then be named FK_<4chars>_<4chars>_<something>

After a while, you "get" the names pretty quickly.

For SPs, you could do the same. eg: prefix something with the "group"
they belong to. For example:

and so on.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
My thoughts:
Database development questions? Check the forum!