Re: [HACKERS] A notice for too long names

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] A notice for too long names
Date: 2000-01-20 15:28:57
Message-ID: 388729B9.E71B7684@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-01-20 15:29:22 Re: [HACKERS] Re: Postgres improvement
Previous Message Oliver Elphick 2000-01-20 15:21:24 COPY problems with psql / libpq