Re: [SQL] How to reject overlapping timespans?

2013-02-17 Thread Ben Morrow
Quoth maps...@gmx.net (Andreas): > Am 17.02.2013 19:20, schrieb Andreas Kretschmer: > > Andreas hat am 17. Februar 2013 um 18:02 geschrieben: > >> I need to store data that has a valid timespan with start and enddate. > >> > >> objects ( id, name, ... ) > >> object_data ( object_id referencs objec

Re: [SQL] How to reject overlapping timespans?

2013-02-17 Thread Andreas
Am 17.02.2013 19:20, schrieb Andreas Kretschmer: Andreas hat am 17. Februar 2013 um 18:02 geschrieben: I need to store data that has a valid timespan with start and enddate. objects ( id, name, ... ) object_data ( object_id referencs objects(id), startdate, enddate, ... ) nothing special, yet

Re: [SQL] How to reject overlapping timespans?

2013-02-17 Thread Andreas Kretschmer
Andreas hat am 17. Februar 2013 um 18:02 geschrieben: > Hi, > > I need to store data that has a valid timespan with start and enddate. > > objects ( id, name, ... ) > object_data ( object_id referencs objects(id), startdate, enddate, ... ) > > nothing special, yet > > How can I have PG reject a

[SQL] How to reject overlapping timespans?

2013-02-17 Thread Andreas
Hi, I need to store data that has a valid timespan with start and enddate. objects ( id, name, ... ) object_data ( object_id referencs objects(id), startdate, enddate, ... ) nothing special, yet How can I have PG reject a data record where the new start- or enddate lies between the start- or

Re: [SQL] Perform Function When The Rows Of A View Change

2013-02-17 Thread Ben Morrow
Quoth adam.mailingli...@gmail.com (Adam): > > I have a rather complicated view that is dependent upon multiple > tables, consisting of several windowing and aggregate functions, as > well as some time intervals. I would like to be able to perform a > function, i.e. pg_notify(), whenever a row is a

Re: [SQL] upsert doesn't seem to work..

2013-02-17 Thread Ben Morrow
Quoth bier...@gmail.com (Bert): > > We continuously load data from flat files in our database. > We first insert the data into unlogged tables (in the loadoltp schema), and > then we use the 'upsert' statement to transfer the data from the load table > into the tables we are going to use. > > The