Re: [GENERAL] Best way to prevent overlapping dates

2007-05-29 Thread Michael Glaesemann
On May 29, 2007, at 12:41 , Jeff Davis wrote: "CREATE CONSTRAINT TRIGGER is used within CREATE TABLE/ALTER TABLE and by pg_dump to create the special triggers for referential integrity. It is not intended for general use." Is there harm in using constraint triggers outside of pg_dump? It

Re: [GENERAL] Best way to prevent overlapping dates

2007-05-29 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > Is there harm in using constraint triggers outside of pg_dump? It seems > like deferrable constraints would be useful for many applications, but > the docs imply that it's a bad idea. It's un-deprecated as of 8.3. regards, tom lane

Re: [GENERAL] Best way to prevent overlapping dates

2007-05-29 Thread Jeff Davis
On Tue, 2007-05-29 at 10:59 -0500, Michael Glaesemann wrote: > On May 25, 2007, at 3:22 , Andrus wrote: > > > CREATE TRIGGER puhkus_sequenced_trigger BEFORE INSERT OR UPDATE ON > > puhkus > >FOR EACH ROW EXECUTE PROCEDURE puhkus_sequenced_pkey(); > > You can also use CREATE CONSTRAINT TRIGG

Re: [GENERAL] Best way to prevent overlapping dates

2007-05-29 Thread Michael Glaesemann
On May 25, 2007, at 3:22 , Andrus wrote: CREATE TRIGGER puhkus_sequenced_trigger BEFORE INSERT OR UPDATE ON puhkus FOR EACH ROW EXECUTE PROCEDURE puhkus_sequenced_pkey(); You can also use CREATE CONSTRAINT TRIGGER, which allows you to have deferrable constraints. This is useful if stat