automatic sequences
От | Richard Harvey Chapman |
---|---|
Тема | automatic sequences |
Дата | |
Msg-id | Pine.LNX.4.10.10007121126420.10311-100000@smile.3gfp.com обсуждение исходный текст |
Ответы |
Re: automatic sequences
|
Список | 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=#
В списке pgsql-general по дате отправления: