Do I understad correctly that i cannot point a Foreign Key to a view? Which is the rationale of this?
TIA sandro *:-) test=# alter table mail_inviate test-# add constraint mail_inviate_fk test-# FOREIGN KEY (mittente) REFERENCES mail_view(mail_address) test-# ; ERROR: referenced relation "mail_view" is not a table -- Sandro Dentella *:-) http://www.tksql.org TkSQL Home page - My GPL work ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match