Re: Truncation of char, varchar types

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgresql.org
Date: 2001-04-13T05:16:43Z
Lists: pgsql-hackers
ncm@zembu.com (Nathan Myers) writes:
> We have noticed here also that object (e.g. table) names get truncated 
> in some places and not others.  If you create a table with a long name, 
> PG truncates the name and creates a table with the shorter name; but 
> if you refer to the table by the same long name, PG reports an error.

Example please?  This is clearly a bug.  It is also demonstrably not
the case in ordinary scenarios:

play=> create table a1234567890123456789012345678901234567890(f1 int);
NOTICE:  identifier "a1234567890123456789012345678901234567890" will be truncated to "a123456789012345678901234567890"
CREATE
play=> select * from a1234567890123456789012345678901234567890;
NOTICE:  identifier "a1234567890123456789012345678901234567890" will be truncated to "a123456789012345678901234567890"
 f1
----
(0 rows)

play=> select * from "a1234567890123456789012345678901234567890";
NOTICE:  identifier "a1234567890123456789012345678901234567890" will be truncated to "a123456789012345678901234567890"
 f1
----
(0 rows)

I have a vague recollection that we found/fixed one or more such bugs in
isolated contexts during 7.1 development, so the issue may be gone
already.

			regards, tom lane