7.0.0 long name truncation problem

From: Ed Loehr <ed(at)www(dot)accuros(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: 7.0.0 long name truncation problem
Date: 2001-05-11 18:42:59
Message-ID: 200105111842.NAA20534@www.accuros.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When the name of a sequence auto-generated from a SERIAL type would be
longer than 32 chars, it appears that "CREATE TABLE" uses a different
name truncation algorithm than "DROP SEQUENCE". Example below. Note
the difference between the following:

'process_state_subscripti_id_seq'
'process_state_subscription_id_s'

Might be fixed in 7.1, I dunno. Can anyone confirm this is a problem?

Regards,
Ed Loehr

% 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gilles DAROLD 2001-05-11 18:48:59 Oracle to pg update
Previous Message Mitch Vincent 2001-05-11 18:23:38 Re: Index on a function(field)