Re: [HACKERS] serial type as foreign key referential integrity

2002-09-03 Thread Stephan Szabo
On 31 Aug 2002, Zhicong Leo Liang wrote: > Hi all, > Just briefly describe my problem. > I have two tables. > create table A( >a1 serial primary key, >a2 varchars(10) > ); > create table B( > b1 integer primary key, > b2 Integer, > foreign key(b2) references a(a1)

Re: [HACKERS] serial type as foreign key referential integrity violation

2002-09-03 Thread Shridhar Daithankar
On 31 Aug 2002 at 5:28, Zhicong Leo Liang wrote: > Hi all, > Just briefly describe my problem. > I have two tables. > create table A( >a1 serial primary key, >a2 varchars(10) that should be varchar.. > ); > create table B( > b1 integer primary key, > b2 Integer, >

[HACKERS] serial type as foreign key referential integrity violation

2002-09-03 Thread Zhicong Leo Liang
Hi all, Just briefly describe my problem. I have two tables. create table A( a1 serial primary key, a2 varchars(10) ); create table B( b1 integer primary key, b2 Integer, foreign key(b2) references a(a1) ) insert into A values('123'); select a1 from A where a2='123'