Re: [SQL] Why the weak key is created as unique

2001-10-05 Thread Stephan Szabo
You probably do not want a serial in BBB since you want to be setting the values. Use "a int references AAA" instead I think. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[SQL] Why the weak key is created as unique

2001-10-05 Thread Marat Khairullin
Example: mydb=> create table AAA (a serial primary key); NOTICE: CREATE TABLE will create implicit sequence 'aaa_a_seq' for SERIAL column 'aaa.a' NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'aaa_pkey' for table 'aaa' CREATE mydb=> create table BBB (a serial references AAA, b i

[SQL] Why the weak key is created as unique

2001-10-05 Thread Marat Khairullin
mydb=> create table AAA (a serial primary key); NOTICE: CREATE TABLE will create implicit sequence 'aaa_a_seq' for SERIAL column 'aaa.a' NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'aaa_pkey' for table 'aaa' CREATE mydb=> create table BBB (a serial references AAA, b integer, pr