<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>SimonOnSoftware</title>
	
	<link>http://simononsoftware.com</link>
	<description>programming, databases and other IT something</description>
	<lastBuildDate>Wed, 23 Nov 2011 11:42:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SimonOnSoftware" /><feedburner:info uri="simononsoftware" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The Importance of Database Testing</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/V3J8svsoJZU/</link>
		<comments>http://simononsoftware.com/the-importance-of-database-testing/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 11:39:37 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[antipattern]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1381</guid>
		<description>Basic Mistakes in Database Testing There is a huge number of books about TDD. Those books usually concentrate on using test for units of work. Units of work are understood in many different ways, usually it means a class. So the books say: write a lot of tests, make code in such a way the [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/testing-database-small-reply/' rel='bookmark' title='Testing Database &amp;#8211; Small Reply'&gt;Testing Database &amp;#8211; Small Reply&lt;/a&gt; &lt;small&gt;On Ovid&amp;#8217;s blog I found lately this entry. First of...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/unit-test-your-database/' rel='bookmark' title='Unit Test Your Database.'&gt;Unit Test Your Database.&lt;/a&gt; &lt;small&gt;I observe the endless war about TDD. On one side...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/checking-postgresql-database-creation-date/' rel='bookmark' title='Checking PostgreSQL Database Creation Date'&gt;Checking PostgreSQL Database Creation Date&lt;/a&gt; &lt;small&gt;Some time ago we had a problem: on testing there...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/V3J8svsoJZU" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/the-importance-of-database-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/the-importance-of-database-testing/</feedburner:origLink></item>
		<item>
		<title>PostgreSQL Versioning Policy</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/3Ofo4h4Z1DU/</link>
		<comments>http://simononsoftware.com/postgresql-versioning-policy/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 13:19:27 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1377</guid>
		<description>I was explaining the PostgreSQL version naming convention to my colleague a couple of days ago. The differences between e.g. 8.3 and 8.4 and what is different between 8.4 and 9.0 and what should be used during database migration to another version. I knew all that just because somebody told me that many years ago [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/unit-test-your-database/' rel='bookmark' title='Unit Test Your Database.'&gt;Unit Test Your Database.&lt;/a&gt; &lt;small&gt;I observe the endless war about TDD. On one side...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-check-postgresql-privileges/' rel='bookmark' title='How to check PostgreSQL privileges.'&gt;How to check PostgreSQL privileges.&lt;/a&gt; &lt;small&gt;Someone asked me how to list all tables that a...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/problem-with-random-in-postgresql-subselect/' rel='bookmark' title='Problem with random() in PostgreSQL Subselect'&gt;Problem with random() in PostgreSQL Subselect&lt;/a&gt; &lt;small&gt;In the simple project I work sometimes on, I need...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/3Ofo4h4Z1DU" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/postgresql-versioning-policy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/postgresql-versioning-policy/</feedburner:origLink></item>
		<item>
		<title>Unit Test Your Database.</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/Pu3UWuslWIg/</link>
		<comments>http://simononsoftware.com/unit-test-your-database/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 20:14:29 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[pl/pgsql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1356</guid>
		<description>I observe the endless war about TDD. On one side there are those who claim that TDD is the best thing since sliced bread. On the other side there are those who claim that TDD is just a waste of time and is too slow. But what about databases? Nobody writes about them too seriously. [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/testing-database-small-reply/' rel='bookmark' title='Testing Database &amp;#8211; Small Reply'&gt;Testing Database &amp;#8211; Small Reply&lt;/a&gt; &lt;small&gt;On Ovid&amp;#8217;s blog I found lately this entry. First of...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/why-use-orms/' rel='bookmark' title='Why Use ORMs?'&gt;Why Use ORMs?&lt;/a&gt; &lt;small&gt;Why Use ORMs? ORM aka Object Relational Mapping is a...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/the-importance-of-database-testing/' rel='bookmark' title='The Importance of Database Testing'&gt;The Importance of Database Testing&lt;/a&gt; &lt;small&gt;Basic Mistakes in Database Testing There is a huge number...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/Pu3UWuslWIg" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/unit-test-your-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/unit-test-your-database/</feedburner:origLink></item>
		<item>
		<title>How to Ensure There is One Row… part 2</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/Onv4QNROlfc/</link>
		<comments>http://simononsoftware.com/how-to-ensure-there-is-one-row-part-2/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 20:31:02 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[unique index]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1346</guid>
		<description>Some time ago I wrote about ensuring that there is only one row with a specific value in a column. Today a very similar problem: there is a table like this: CREATE TABLE test ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, value TEXT NOT NULL ); We need to be sure that there [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-ensure-there-is-one-row-with-a-value/' rel='bookmark' title='How to Ensure There is One Row With a Value'&gt;How to Ensure There is One Row With a Value&lt;/a&gt; &lt;small&gt;The Problem Let&amp;#8217;s imagine a business requirement that there should...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/sqlalchemy-defines-new-sql-standard/' rel='bookmark' title='SQLAlchemy Defines New SQL Standard'&gt;SQLAlchemy Defines New SQL Standard&lt;/a&gt; &lt;small&gt;Dreaming About SQL Well, I thought that I know the...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-allow-for-max-4-rows-in-update-postgresql/' rel='bookmark' title='How to Allow For Max 4 Rows in Update (PostgreSQL)'&gt;How to Allow For Max 4 Rows in Update (PostgreSQL)&lt;/a&gt; &lt;small&gt;The Problem Question found on the net: how to restrict...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/Onv4QNROlfc" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/how-to-ensure-there-is-one-row-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/how-to-ensure-there-is-one-row-part-2/</feedburner:origLink></item>
		<item>
		<title>What Is The Real PostgreSQL Triggers Ordering</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/L8Oys0x1Q6o/</link>
		<comments>http://simononsoftware.com/what-is-the-real-postgresql-triggers-ordering/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 20:49:00 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1327</guid>
		<description>Introduction During the last database training that I led, I was talking about selecting rows from database and sorting them (including some problems with collations). Later I was talking about triggers. For this entry assume that there are only row level triggers. When you perform e.g. INSERT in PostgreSQL, there are fired triggers (if they [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-allow-for-max-4-rows-in-update-postgresql/' rel='bookmark' title='How to Allow For Max 4 Rows in Update (PostgreSQL)'&gt;How to Allow For Max 4 Rows in Update (PostgreSQL)&lt;/a&gt; &lt;small&gt;The Problem Question found on the net: how to restrict...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/postgresql-collation/' rel='bookmark' title='PostgreSQL Collation &amp;#8211; part 1'&gt;PostgreSQL Collation &amp;#8211; part 1&lt;/a&gt; &lt;small&gt;PostgreSQL is (IMHO) much better than MySQL but unfortunately it ...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/postgresql-found-problem/' rel='bookmark' title='PostgreSQL FOUND Problem'&gt;PostgreSQL FOUND Problem&lt;/a&gt; &lt;small&gt;FOUND is a global variable that exists in the plpgsql...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/L8Oys0x1Q6o" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/what-is-the-real-postgresql-triggers-ordering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/what-is-the-real-postgresql-triggers-ordering/</feedburner:origLink></item>
		<item>
		<title>How To Store UUIDs in PostgreSQL</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/EbG8owv01S4/</link>
		<comments>http://simononsoftware.com/how-to-store-uuids-in-postgresql/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 20:34:01 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1287</guid>
		<description>This story is a just another example of what I call Using varchar(255) for everything won&amp;#8217;t make you a sorcerer. Every database has many different types, they are there on purpose, not by accident. I&amp;#8217;ve seen that too many times: a programmer (most companies don&amp;#8217;t have DBAs for that) creates a database structure using ONE [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/uuid-and-java/' rel='bookmark' title='UUID and Java :)'&gt;UUID and Java :)&lt;/a&gt; &lt;small&gt;Why not to use UUID as Primary Key and that...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/random-string-in-postgresql/' rel='bookmark' title='Random String in PostgreSQL'&gt;Random String in PostgreSQL&lt;/a&gt; &lt;small&gt;Last time I wrote about the common problem with the...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/postgis-and-small-number-of-huge-geometries/' rel='bookmark' title='PostGIS and Small Number of Huge Geometries'&gt;PostGIS and Small Number of Huge Geometries&lt;/a&gt; &lt;small&gt;The Problem A couple of weeks ago I had a...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/EbG8owv01S4" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/how-to-store-uuids-in-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/how-to-store-uuids-in-postgresql/</feedburner:origLink></item>
		<item>
		<title>PostGIS and Small Number of Huge Geometries</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/nIQptlnw-lw/</link>
		<comments>http://simononsoftware.com/postgis-and-small-number-of-huge-geometries/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 20:29:21 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1278</guid>
		<description>The Problem A couple of weeks ago I had a quite strange situation: a PostgreSQL table with small number of huge geometries. A program had to query the table really often, so the speed was a crucial thing. Replicate the Situation Small Number of Big Geometries First of all let s create a couple of [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/postgresql-strange-timings/' rel='bookmark' title='PostgreSQL Strange Timings'&gt;PostgreSQL Strange Timings&lt;/a&gt; &lt;small&gt;A very simple query. PostgreSQL 8.4. I have no idea...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/are-sql-database-joins-so-bad/' rel='bookmark' title='Are SQL Database Joins So Bad?'&gt;Are SQL Database Joins So Bad?&lt;/a&gt; &lt;small&gt;Last time on many forums there were endless discussions about...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-allow-for-max-4-rows-in-update-postgresql/' rel='bookmark' title='How to Allow For Max 4 Rows in Update (PostgreSQL)'&gt;How to Allow For Max 4 Rows in Update (PostgreSQL)&lt;/a&gt; &lt;small&gt;The Problem Question found on the net: how to restrict...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/nIQptlnw-lw" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/postgis-and-small-number-of-huge-geometries/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/postgis-and-small-number-of-huge-geometries/</feedburner:origLink></item>
		<item>
		<title>Why Is Query Slow?</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/UX2AWwzqbyw/</link>
		<comments>http://simononsoftware.com/why-is-query-slow/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 14:18:25 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1246</guid>
		<description>A couple of days ago a colleague of mine had a quite normal problem. The query was slow. The whole application was written in Java, using Hibernate, tables were small. There were about 30 rows in one table, and 10 in another. One small join, one call of PostGIS function. The query took several seconds [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/what-a-big-database-is-and-why-there-isnt-anything-like-that/' rel='bookmark' title='What a big database is and why there isn&amp;#8217;t anything like that.'&gt;What a big database is and why there isn&amp;#8217;t anything like that.&lt;/a&gt; &lt;small&gt;Yea, simple question. Usually I hear something like this: &amp;#8220;Help...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/postgresql-strange-timings/' rel='bookmark' title='PostgreSQL Strange Timings'&gt;PostgreSQL Strange Timings&lt;/a&gt; &lt;small&gt;A very simple query. PostgreSQL 8.4. I have no idea...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/unit-test-your-database/' rel='bookmark' title='Unit Test Your Database.'&gt;Unit Test Your Database.&lt;/a&gt; &lt;small&gt;I observe the endless war about TDD. On one side...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/UX2AWwzqbyw" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/why-is-query-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/why-is-query-slow/</feedburner:origLink></item>
		<item>
		<title>Problem with random() in PostgreSQL Subselect</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/t_G9RJcxPFc/</link>
		<comments>http://simononsoftware.com/problem-with-random-in-postgresql-subselect/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 20:04:10 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1263</guid>
		<description>In the simple project I work sometimes on, I need to generate a lot of random data in PostgreSQL database. I&amp;#8217;ve got a couple of functions for that, but all of them are based on the simple random() function. The random() returns value from the range [0, 1): # select random(); random ------------------- 0.583591205533594 (1 [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/random-string-in-postgresql/' rel='bookmark' title='Random String in PostgreSQL'&gt;Random String in PostgreSQL&lt;/a&gt; &lt;small&gt;Last time I wrote about the common problem with the...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/common-problem-with-random-min-max/' rel='bookmark' title='Common Problem with random(min, max)'&gt;Common Problem with random(min, max)&lt;/a&gt; &lt;small&gt;There is a common problem with many homemade random functions....&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-ensure-there-is-one-row-with-a-value/' rel='bookmark' title='How to Ensure There is One Row With a Value'&gt;How to Ensure There is One Row With a Value&lt;/a&gt; &lt;small&gt;The Problem Let&amp;#8217;s imagine a business requirement that there should...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/t_G9RJcxPFc" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/problem-with-random-in-postgresql-subselect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/problem-with-random-in-postgresql-subselect/</feedburner:origLink></item>
		<item>
		<title>How to Ensure There is One Row With a Value</title>
		<link>http://feedproxy.google.com/~r/SimonOnSoftware/~3/Xz1aMW2bRMg/</link>
		<comments>http://simononsoftware.com/how-to-ensure-there-is-one-row-with-a-value/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 18:46:19 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[unique index]]></category>

		<guid isPermaLink="false">http://simononsoftware.com/?p=1256</guid>
		<description>The Problem Let&amp;#8217;s imagine a business requirement that there should be only one active row in a table. Active means that the column &amp;#8216;is_active&amp;#8217; is set to true. There can be many rows with false or null values. The row with only one value can be only one. The simple table could look like this: [...]


&lt;strong&gt;Related posts:&lt;/strong&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-ensure-there-is-one-row-part-2/' rel='bookmark' title='How to Ensure There is One Row&amp;#8230; part 2'&gt;How to Ensure There is One Row&amp;#8230; part 2&lt;/a&gt; &lt;small&gt;Some time ago I wrote about ensuring that there is...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/how-to-allow-for-max-4-rows-in-update-postgresql/' rel='bookmark' title='How to Allow For Max 4 Rows in Update (PostgreSQL)'&gt;How to Allow For Max 4 Rows in Update (PostgreSQL)&lt;/a&gt; &lt;small&gt;The Problem Question found on the net: how to restrict...&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='http://simononsoftware.com/sqlalchemy-defines-new-sql-standard/' rel='bookmark' title='SQLAlchemy Defines New SQL Standard'&gt;SQLAlchemy Defines New SQL Standard&lt;/a&gt; &lt;small&gt;Dreaming About SQL Well, I thought that I know the...&lt;/small&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/SimonOnSoftware/~4/Xz1aMW2bRMg" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://simononsoftware.com/how-to-ensure-there-is-one-row-with-a-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://simononsoftware.com/how-to-ensure-there-is-one-row-with-a-value/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 9608/9730 objects using disk: basic

Served from: simononsoftware.com @ 2012-01-28 07:53:40 -->

