On Mon, May 09, 2005 at 02:05:14AM +1000, Brendan Jurd wrote: > CREATE TABLE foo ( > foo int NOT NULL REFERENCES bar INDEX > ); > > ... would be marvellous I agree that it would be handy. Another possibility is throwing a NOTICE or even WARNING if you create a foreign key that isn't covered by an index. > My apologies if this has been answered before, but a search of the > -general mailing list was not fruitful. FYI, often times new ideas are only discussed on -hackers, so you should search there as well. -- Jim C. Nasby, Database Consultant decibel@xxxxxxxxxxx Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?" ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match