Subject Re: [firebird-support] Stored Procedure Name : 32 chars max in Firebird 2.x ?
Author t.s.
> > 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.
Thanks for the confirmation.
Any idea whether this limit will be upgraded soon ?
I suppose this won't be as easy as changing some type declarations and
recompiling.... I'd be soooo happy with 80 or even 64 chars.....:D How
do i file a feature request? Should i post to the devel list ?

> >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.
I agree with the 'pain' comment, but the current condition is rather
painful too, see below.

> 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)
Thank you for the advice. That's sort of what we've been doing so far,
and we keep bumping into the limit. Here's an example :
...
sp_get_total_from_sales_order(:sales_order_id)
...
Total 29 chars, safe. But later on we have to extend this sp to
additional functionalities, like :
...
sp_get_total_from_sales_order_of_customer(:customer_id)
...
Whoopsie, cannot do this, let's redefine SALES_ORDER as SO, and CUSTOMER
as CUST. So we went back and change all the stored proc names (lots :D)
to be consistent, so now we have :
...
sp_get_total_from_SO()
sp_get_total_from_SO_of_CUST()
...
That last one is 28 characters, again, safe for now, until the client
asks for something else.
...
sp_get_total_from_SO_of_CUST_by_month(
customer_id, begin_date, end_date)
...

Ouch, 37 chars :) And then we end up with unreadable, ridiculous names
like :
...
sp_get_t_so_cust_m(...)
...
After a while, going back and redefining stuffs are really painful :) I
might try removing all the underscores next, but it's kinda part of the
coding convention. The "sp_get" prefix is for differentiating between
different kinds of stored procs. we got "sp_get", "sp_list", "sp_ins",
"sp_del", "sp_upd", etc, etc.

Thanks,
t.s.

PS: sorry for late follow up, city was flooded :)