Re: [HACKERS] A notice for too long names - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] A notice for too long names
Date
Msg-id 388729B9.E71B7684@alumni.caltech.edu
Whole thread Raw
In response to A notice for too long names  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Responses Re: [HACKERS] A notice for too long names
List pgsql-hackers
> Wouldn't it be fair if a notice was generated if you attempt to create
> and/or reference a name that's longer than NAMEDATALEN. Like
> 
> => create table some_really_much_too_long_name_here ( ... );
> NOTICE:  "some_really_much_too_long_name_here" will be truncated to
> "some_really_much_too_long_name_" [ <possible reference to documentation
> and/or source code to change this> ]
> Better than finding out after the fact, ISTM. I could (try to) take care
> of this.

Would it be better to throw an elog(ERROR)? The only place I know of
where names are silently truncated is in generating primary and unique
indices, where the names are based on the underlying table name plus
some automatically generated discriminator.
                   - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Postgres improvement
Next
From: "Oliver Elphick"
Date:
Subject: COPY problems with psql / libpq