On Tue, 8 May 2007 15:54:08 +0200 Martijn van Oosterhout <kleptog@xxxxxxxxx> wrote: > A unique index is not a "substitute" for a unique constraint, they're > exactly the same thing. If you drop your constraint and create a > unique index, you're back where you started. You neither added nor > removed anything. Yes. For this reason I didn't have to implement *both* 'unique constraints' *and* 'unique indices' in my pg interface. > On a certain level foreign keys are just triggers, specially coded to > do the work. Yes, you could write your own triggers to do exactly the > same thing, but why bother, when someone has written them for you and > made nice syntax to use them? My question simply was if I could save coding time... like with 'unique constaints' and 'indeces', see above. However, for what I have learned now, 'foreign keys' can *not* be substituted by indeces, so I have to implement them. Thanks again. Felix