Re: Truncation of char, varchar types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Truncation of char, varchar types
Date
Msg-id 2788.987139003@sss.pgh.pa.us
Whole thread Raw
In response to Re: Truncation of char, varchar types  (ncm@zembu.com (Nathan Myers))
Responses Truncation of object names  (ncm@zembu.com (Nathan Myers))
List 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


pgsql-hackers by date:

Previous
From: Mark Butler
Date:
Subject: ALTER TABLE MODIFY COLUMN
Next
From: Mark Butler
Date:
Subject: Re: DOUBLE synonym for DOUBLE PRECISION