<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PostgreSQL WEST and Temporal Databases</title>
	<atom:link href="http://thoughts.j-davis.com/2009/10/12/postgresql-west-and-temporal-databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://thoughts.j-davis.com/2009/10/12/postgresql-west-and-temporal-databases/</link>
	<description>Ideas on Databases, Logic, and Language by Jeff Davis</description>
	<lastBuildDate>Tue, 18 Oct 2011 07:43:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Edward Green</title>
		<link>http://thoughts.j-davis.com/2009/10/12/postgresql-west-and-temporal-databases/comment-page-1/#comment-1353</link>
		<dc:creator>Edward Green</dc:creator>
		<pubDate>Mon, 27 Sep 2010 12:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://thoughts.j-davis.com/?p=152#comment-1353</guid>
		<description>if you are interested i came across some articles on how to use periods and scheduling by http://www.sharedshares.com SE. hope you&#039;ll find this information as interesting as I did.</description>
		<content:encoded><![CDATA[<p>if you are interested i came across some articles on how to use periods and scheduling by <a href="http://www.sharedshares.com" rel="nofollow">http://www.sharedshares.com</a> SE. hope you&#8217;ll find this information as interesting as I did.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bailey</title>
		<link>http://thoughts.j-davis.com/2009/10/12/postgresql-west-and-temporal-databases/comment-page-1/#comment-104</link>
		<dc:creator>Scott Bailey</dc:creator>
		<pubDate>Tue, 13 Oct 2009 17:24:13 +0000</pubDate>
		<guid isPermaLink="false">http://thoughts.j-davis.com/?p=152#comment-104</guid>
		<description>Rob,

Actually you can solve this problem w/o any procedural code. You use the combination of a schedule table and a calendar table to project those into periods in a view. From there its easy to test for overlap or containment.

I&#039;m planning on writing a couple articles on how to use periods and scheduling so I&#039;ll be sure to cover this.

Scott</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>Actually you can solve this problem w/o any procedural code. You use the combination of a schedule table and a calendar table to project those into periods in a view. From there its easy to test for overlap or containment.</p>
<p>I&#8217;m planning on writing a couple articles on how to use periods and scheduling so I&#8217;ll be sure to cover this.</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Davis</title>
		<link>http://thoughts.j-davis.com/2009/10/12/postgresql-west-and-temporal-databases/comment-page-1/#comment-103</link>
		<dc:creator>Jeff Davis</dc:creator>
		<pubDate>Tue, 13 Oct 2009 17:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://thoughts.j-davis.com/?p=152#comment-103</guid>
		<description>Yeah, that&#039;s a tough one, I&#039;m glad you brought that up. There are a few tricks, like using generate_series, that can make it almost bearable without resorting to procedural code.

I&#039;ll spend some more time thinking about this one and I&#039;ll see what other people have to say. I think that a reasonable solution exists if we make a significantly more complex type that represents am infinite set of non-contiguous periods. That would be a significant amount of work, and we&#039;d need to make the internal representation flexible enough to represent many patterns.</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;s a tough one, I&#8217;m glad you brought that up. There are a few tricks, like using generate_series, that can make it almost bearable without resorting to procedural code.</p>
<p>I&#8217;ll spend some more time thinking about this one and I&#8217;ll see what other people have to say. I think that a reasonable solution exists if we make a significantly more complex type that represents am infinite set of non-contiguous periods. That would be a significant amount of work, and we&#8217;d need to make the internal representation flexible enough to represent many patterns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob W</title>
		<link>http://thoughts.j-davis.com/2009/10/12/postgresql-west-and-temporal-databases/comment-page-1/#comment-102</link>
		<dc:creator>Rob W</dc:creator>
		<pubDate>Tue, 13 Oct 2009 13:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://thoughts.j-davis.com/?p=152#comment-102</guid>
		<description>One of the reasons I like PostgreSQL so much is that it handles dates and time better than most other databases. Although a PERIOD data type is useful for representing *definite* start and end times, another related problem is representing *indefinite* start and end times. One use case (that I had experienced myself) is having to represent employee work-shifts, such as an *indefinite* Monday from 7:00am to 5:00pm (e.g. *any* Monday), and having to ask: does &#039;2009/10/05 12:00&#039; as a *definite* instant of time fall within that *indefinite* span of time? It&#039;s a fairly common problem to ask, within which work-shift did this even occur? Unfortunately, PostgreSQL (or any other DBMS I tried) couldn&#039;t help unless I converted the indefinite time to definite timestamps, so I used pgsql functions for this. The logic gets pretty hairy as you hit midnight, cross into the next year, have a work-shift that crosses multiple days, etc.</description>
		<content:encoded><![CDATA[<p>One of the reasons I like PostgreSQL so much is that it handles dates and time better than most other databases. Although a PERIOD data type is useful for representing *definite* start and end times, another related problem is representing *indefinite* start and end times. One use case (that I had experienced myself) is having to represent employee work-shifts, such as an *indefinite* Monday from 7:00am to 5:00pm (e.g. *any* Monday), and having to ask: does &#8217;2009/10/05 12:00&#8242; as a *definite* instant of time fall within that *indefinite* span of time? It&#8217;s a fairly common problem to ask, within which work-shift did this even occur? Unfortunately, PostgreSQL (or any other DBMS I tried) couldn&#8217;t help unless I converted the indefinite time to definite timestamps, so I used pgsql functions for this. The logic gets pretty hairy as you hit midnight, cross into the next year, have a work-shift that crosses multiple days, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thom Brown</title>
		<link>http://thoughts.j-davis.com/2009/10/12/postgresql-west-and-temporal-databases/comment-page-1/#comment-101</link>
		<dc:creator>Thom Brown</dc:creator>
		<pubDate>Tue, 13 Oct 2009 11:16:49 +0000</pubDate>
		<guid isPermaLink="false">http://thoughts.j-davis.com/?p=152#comment-101</guid>
		<description>That sounds like a very useful development, and I can already see the reduction in clumsy and slow code for date-checking and event clashes.  I can only make it to PGDay in Paris unfortunately, but I&#039;ll be following news on this where I can.

It sounds like the alterations for your operator exclusion contraints could pave the way for more useful indexable features like this.

Nice work Jeff!</description>
		<content:encoded><![CDATA[<p>That sounds like a very useful development, and I can already see the reduction in clumsy and slow code for date-checking and event clashes.  I can only make it to PGDay in Paris unfortunately, but I&#8217;ll be following news on this where I can.</p>
<p>It sounds like the alterations for your operator exclusion contraints could pave the way for more useful indexable features like this.</p>
<p>Nice work Jeff!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

