Forum OpenACS Development: Function names too long for Postgres

I've been struggling to get the development head from cvs to work on postgres the past couple of days. Through my struggles, I noticed that a lot of the newly added plpgsql function names are longer than the 31 characters allowed by a default installation of Postgres (default in 7.2.1 at least). When these functions are created, Postgres truncates them the the 31 allowed characters.

I don't know if this would cause problems with the functionality of OACS, so I changed my NAMEDATALEN to allow 64 (63 actually, since Postgres uses NAMEDATALEN-1) characters and recompiled Postgres and of course, the errors went away.

What kind of problems will having excessively long names cause for Postgres users now and in the future? Will all Postgres installations of OACS have to change this default length?

Collapse
Posted by Andrei Popov on

I think Roberto or Don were running a thread some time in the past that was suggesting that PG team should probably up the default from 32 to 64 or more. Therefore, I am guessing, aside from being difficult to remember such_a_very_very_very_long_name_of_a__function, there should be no impact.

OTOH, we end up with long names because we convert

package_name.{function|procedure}_name[.{argument|variable}_name]
(each of which may well be within 31 characters limit into a single string (albeit shortened at times for readability):
package_name__{function|procedure}_name[__{argument|variable}_name]

Collapse
Posted by Don Baccus on
It's just a warning and doesn't cause problems, the name's truncated, that's all.  If there's a clash over the first 32 chars you'll get an additional error indicating that the name's a duplicate ...

So, in brief - ignore these warnings.