Foreign Key constraint and Alter Table command

Started by Carlos Felipe Zirbesover 25 years ago2 messagesgeneral
Jump to latest
#1Carlos Felipe Zirbes
carlosz@dbserver.com.br

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

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Carlos Felipe Zirbes (#1)
Re: Foreign Key constraint and Alter Table command

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(); ?