Thread: Foreign Key constraint and Alter Table command
Hi.
I am using postgres 7.0.can't_remember_the_rest and I am not able to add a FK via alter table command. When I try to do it I get an "Feature not implemented" error message. This is what I've been trying to do:
alter table foo
add constraint foo_fk
foreign key (a) references foo_2
where "a" is a column name in foo.
I thought I would be able to add constraints via alter table by using pgsql 7. Was I wrong?
Thanks in advance,
Zirbes
On Tue, 12 Dec 2000, Carlos Felipe Zirbes wrote: > Hi. > > I am using postgres 7.0.can't_remember_the_rest and I am not able to add a > FK via alter table command. When I try to do it I get an "Feature not > implemented" error message. This is what I've been trying to do: > > alter table foo > add constraint foo_fk > foreign key (a) references foo_2 > > where "a" is a column name in foo. > > I thought I would be able to add constraints via alter table by using pgsql > 7. Was I wrong? Strange, the above statement works for me in 7.0.2 once I make a foo and foo_2 table. Can you do a select version(); ?