name truncation problem in 7.0.0

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: pggeneral <pgsql-general(at)postgreSQL(dot)org>
Subject: name truncation problem in 7.0.0
Date: 2001-05-11 17:41:00
Message-ID: 3AFC242C.63A7D2CB@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Maybe someone can confirm what looks like a long-name-truncation bug in
7.0.0? I haven't tested it on newer releases, nor have I dug into the
code. The problem appears to be that a different truncation algorithm is
used for creating the truncated sequence name than the algorithm used
when doing the 'drop sequence', e.g.,

'process_state_subscripti_id_seq'
'process_state_subscription_id_s'

Here's my test case:

% createdb testdb
CREATE DATABASE

% psql -e -d testdb -f ~ed/pgbug
CREATE TABLE process_state_subscription (
id SERIAL,
process_id INTEGER,
process_state_id INTEGER,
person_id INTEGER NOT NULL
);
psql:/home/ed/pgbug:8: NOTICE: CREATE TABLE will create implicit
sequence 'process_state_subscripti_id_seq' for SERIAL column
'process_state_subscription.id'
psql:/home/ed/pgbug:8: NOTICE: CREATE TABLE/UNIQUE will create implicit
index 'process_state_subscripti_id_key' for table
'process_state_subscription'
CREATE
DROP SEQUENCE process_state_subscription_id_seq;
psql:/home/ed/pgbug:10: NOTICE: identifier
"process_state_subscription_id_seq" will be truncated to
"process_state_subscription_id_s"
psql:/home/ed/pgbug:10: ERROR: Relation
'process_state_subscription_id_s' does not exist

Regards,
Ed Loehr

Attachment Content-Type Size
eloehr.vcf text/x-vcard 284 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gabriel Fernandez 2001-05-11 17:42:02 Index on a function(field)
Previous Message Tom Lane 2001-05-11 17:19:41 Re: defunct postmasters