Re: 7.0.2 cuts off attribute name - Mailing list pgsql-hackers

From G. Anthony Reina
Subject Re: 7.0.2 cuts off attribute name
Date
Msg-id 3947C3E6.15A8767C@nsi.edu
Whole thread Raw
In response to 7.0.2 cuts off attribute name  ("G. Anthony Reina" <reina@nsi.edu>)
Responses Re: 7.0.2 cuts off attribute name  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> 7.0 has a new behavior of *telling* you that it's truncating overlength
> identifiers, but the system has always truncated 'em.
>

Yes, I see now in my backups that 6.5.1 was truncating at 31 characters but
just wasn't telling me. I wasn't aware if the limit. So it is nice to have
the notice, but perhaps should only show up once (e.g. when the table is
initially created). That way, once you've been advised of the truncation, it
won't annoy you any longer.

>

> > Is there any reason that this has changed? Anyway to get a larger length
> > (say 40 or 50 characters)?
>
> You could recompile with a larger NAMEDATALEN, but unless you did so in
> your 6.5.* installation, that's not what's bugging you.  Look for the
> elog(NOTICE,...) call in src/backend/parser/scan.l and dike that out,
> instead.
>

I tried changing NAMEDATALEN in the postgres_ext.h to 52. Everything compiled
and installed fine, but the initdb failed. Maybe there is more to it than
just changing that one constant. Anyway, I've gone back to the original
NAMEDATALEN = 32 and will just rename my field to something smaller than 31
chars.


-Tony




pgsql-hackers by date:

Previous
From: "Matthew N. Dodd"
Date:
Subject: Re: Back online
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Fix for RENAME