Re: 7.0.2 cuts off attribute name

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
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 02:59:26
Message-ID: 10801.960951566@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"G. Anthony Reina" <reina(at)nsi(dot)edu> writes:
> "significance_of_anova_for_spike_rates". (I know, I know. I get laughed
> at all the time for using prepositions in my variable names). In 6.5.1
> and before, Postgres took the whole name as the identifier. With 7.0.2
> it seems to truncate to "significance_of_anova_for_spike" (31
> characters).

What? The default length limit has been 31 characters for a long time,
certainly long before 6.5.*.

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

If you're simply complaining about the fact that it emits a notice,
I agree with you 100%: that notice is one of the most nonstandard,
useless, annoying bits of pointless pedantry I've seen in many years.
I argued against it to start with but was outvoted. Maybe we can have
a revote now that people have had some practical experience with it:
who still thinks it's a good idea?

> 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-06-14 03:19:19 Re: Patch 0.2 for Re: [HACKERS] Caching number of blocks in relation to avoi lseek.
Previous Message Bruce Momjian 2000-06-14 02:56:17 Re: Big 7.1 open items