Re: 7.0.2 cuts off attribute name

From: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: 7.0.2 cuts off attribute name
Date: 2000-06-14 17:41:58
Message-ID: 3947C3E6.15A8767C@nsi.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-06-14 19:06:34 Re: 7.0.2 cuts off attribute name
Previous Message Ross J. Reedstrom 2000-06-14 17:36:54 Re: Fix for RENAME