Minor bug: inconsistent handling of overlength names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Minor bug: inconsistent handling of overlength names
Date: 1998-07-26 15:10:51
Message-ID: 11838.901465851@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

DROP INDEX fails on overlength table names:

tgl=> CREATE UNIQUE INDEX MarketOrderHistory_sequenceNo_Index
tgl-> ON MarketOrderHistory USING btree (sequenceNo);
CREATE
tgl=> DROP INDEX MarketOrderHistory_sequenceNo_Index;
ERROR: pg_ownercheck: class "marketorderhistory_sequenceno_index" not found
tgl=> DROP INDEX MarketOrderHistory_sequenceNo_I;
DROP

Evidently DROP INDEX is using a second-rate way of reducing the given
name to canonical form for comparisons.

Some further experimentation shows that CREATE TABLE won't let you
create a relation name >= 32 characters in the first place. So there's
some inconsistency about what's done with overlength names.

It seems to me that we ought to have consistent treatment of long names,
and the treatment I like is the one that CREATE INDEX is using:
silently truncate the given name to what we can handle, and accept
it as long as the truncated form is unique. This is the time-honored
way of handling overlength names in compilers, and it works well.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maarten Boekhold 1998-07-26 19:43:17 Re: [HACKERS] Minor bug: inconsistent handling of overlength names
Previous Message Tom Lane 1998-07-26 15:00:53 Vacuuming an index takes way too long