Re: Truncation of object names - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Truncation of object names
Date
Msg-id 7731.987195324@sss.pgh.pa.us
Whole thread Raw
In response to Re: Truncation of object names  (Joel Burton <jburton@scw.org>)
Responses Re: Truncation of object names  (Joel Burton <jburton@scw.org>)
List pgsql-hackers
Joel Burton <jburton@scw.org> writes:
>> Have you thought about simply increasing NAMEDATALEN in your
>> installation?  If you really are generating names that aren't unique
>> in 31 characters, that seems like the way to go ...

> Other than (a) it wastes a bit of space in the pg_ tables, and (b) it may
> screw up postgresql utility programs (pgaccess, pgadmin, etc.), is there
> any reason to keep the default at 32? Are there performance limitations?

Those are pretty much the reasons, plus a compatibility issue:
NAMEDATALEN *is* visible to clients (that's why it's in postgres_ext.h).
So changing the default value would risk breaking clients that hadn't
been recompiled.

> (Will C-based triggers and client programs and such need to be modified?)

Not if they've been properly coded (written in terms of NAMEDATALEN not
a hard constant).

Obviously, these objections are not strong enough to keep us from
increasing the standard value of NAMEDATALEN if it seems that many
people are running into the limit.  But AFAICT relatively few people
have such problems, and I'm hesitant to make everyone deal with a change
for the benefit of a few.  Count me as a weak vote for leaving it where
it is ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: ncm@zembu.com (Nathan Myers)
Date:
Subject: Re: Truncation of object names
Next
From: Olivier PRENANT
Date:
Subject: pg_dump problem