On 5 Dec 2002 at 9:31, Stephan Szabo wrote: > When we talk about ALTER TABLE ADD FOREIGN KEY we're being imprecise, so > I think that might be why we're talking past each other here. > > Technically the syntax in question is: > ALTER TABLE <table> ADD <table constraint definition> > where CONSTRAINT <name> is an optional leading clause in a table > constraint definition. ADD FOREIGN KEY is a shorthand for a foreign key > constraint (technically unnamed).
Understood. What about allowing a named foreign key? I haven't checked the RFCs > Thus you can also say things like: > ALTER TABLE <table> ADD CONSTRAINT blah CHECK (foo!=0); > to make a named check constraint. Understood. -- Dan Langille : http://www.langille.org/ ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html