automatic sequences

From: Richard Harvey Chapman <hchapman(at)3gfp(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: automatic sequences
Date: 2000-07-12 18:36:55
Message-ID: Pine.LNX.4.10.10007121126420.10311-100000@smile.3gfp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm having trouble with postgres' default naming scheme for sequences.

Does it only use the first 13 characters of the table name and column name
so it doesn't pass the 32 character name limit?

Thanks,

R.

jui=# CREATE TABLE cpu_interface_type (
jui(# cpu_interface_type_code SERIAL PRIMARY KEY,
jui(# name VARCHAR(40) UNIQUE NOT NULL
jui(# );
NOTICE: CREATE TABLE will create implicit sequence
'cpu_interface_cpu_interface_seq' for SERIAL column
'cpu_interface_type.cpu_interface_type_code'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
'cpu_interface_type_pkey' for table 'cpu_interface_type'
NOTICE: CREATE TABLE/UNIQUE will create implicit index
'cpu_interface_type_name_key' for table 'cpu_interface_type'
CREATE
jui=#
jui=# CREATE TABLE cpu_interface_config (
jui(# cpu_interface_config_code SERIAL PRIMARY KEY,
jui(# cpu_interface_type_code INTEGER REFERENCES
cpu_interface_type NOT NULL
jui(# );
NOTICE: CREATE TABLE will create implicit sequence
'cpu_interface_cpu_interface_seq' for SERIAL column
'cpu_interface_config.cpu_interface_config_code'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
'cpu_interface_config_pkey' for table 'cpu_interface_config'
NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ERROR: Relation 'cpu_interface_cpu_interface_seq' already exists
jui=#
jui=# CREATE TABLE cpu_interface (
jui(# cpu_interface_code SERIAL PRIMARY KEY,
jui(# cpu_interface_config_code INTEGER REFERENCES
cpu_interface_config NOT NULL,
jui(# ip_stack_code INTEGER REFERENCES ip_stack NOT NULL
jui(# );
NOTICE: CREATE TABLE will create implicit sequence
'cpu_interface_cpu_interface_seq' for SERIAL column
'cpu_interface.cpu_interface_code'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
'cpu_interface_pkey' for table 'cpu_interface'
NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ERROR: Relation 'cpu_interface_config' does not exist
jui=#

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Javaboy62 2000-07-12 18:39:24 Enterprise Java Beans support?
Previous Message Richard Harvey Chapman 2000-07-12 18:26:36 psql \i