<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Joel on SQL</title>
	<atom:link href="http://joelonsql.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://joelonsql.com</link>
	<description></description>
	<lastBuildDate>Mon, 13 May 2013 14:40:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on ::xml madness by Galen Charlton</title>
		<link>http://joelonsql.com/2013/05/13/xml-madness/comment-page-1/#comment-472</link>
		<dc:creator><![CDATA[Galen Charlton]]></dc:creator>
		<pubDate>Mon, 13 May 2013 14:40:40 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=165#comment-472</guid>
		<description><![CDATA[I also find this super-annoying, especially since I hack on an application that does a lot of munging of XML stored in a PostgreSQL database.  I ended up running with a PL/Perl stored procedure that wraps XML::LibXML and makes sure to return declarations for all namespaces defined in the original XML.  Here it is (credit to Mike Rylander and myself):

https://gist.github.com/gmcharlt/5568683

Using perl_xpath with your example seems to have the desired effect (though note that the XPath expression should probably be &#039;/ns1:testxml/ns1:foo&#039;, not &#039;/testxml/ns1:foo&#039;.]]></description>
		<content:encoded><![CDATA[<p>I also find this super-annoying, especially since I hack on an application that does a lot of munging of XML stored in a PostgreSQL database.  I ended up running with a PL/Perl stored procedure that wraps XML::LibXML and makes sure to return declarations for all namespaces defined in the original XML.  Here it is (credit to Mike Rylander and myself):</p>
<p><a href="https://gist.github.com/gmcharlt/5568683" rel="nofollow">https://gist.github.com/gmcharlt/5568683</a></p>
<p>Using perl_xpath with your example seems to have the desired effect (though note that the XPath expression should probably be &#8216;/ns1:testxml/ns1:foo&#8217;, not &#8216;/testxml/ns1:foo&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ::xml madness by Marko</title>
		<link>http://joelonsql.com/2013/05/13/xml-madness/comment-page-1/#comment-471</link>
		<dc:creator><![CDATA[Marko]]></dc:creator>
		<pubDate>Mon, 13 May 2013 14:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=165#comment-471</guid>
		<description><![CDATA[If you&#039;re guaranteed not to have conflicting names in different namespaces, this works:

SELECT xpath(
    &#039;/foo/bar/text()&#039;,
    (xpath(
        &#039;/testxml/ns1:foo&#039;,
        &#039;baz&#039;::xml,
        ARRAY[
            [&#039;ns1&#039;,&#039;http://www.example.com&#039;],
            [&#039;ns2&#039;,&#039;http://www.example2.com&#039;]
        ]
    ))[1]
);
 xpath 
-------
 {baz}
(1 row)

However, if there are several, you&#039;re screwed unless you want all of them or only a number of them but don&#039;t care which ones:

select xpath(&#039;/foo/bar/text()&#039;, xml &#039;ns1barns2bar&#039;);
      xpath      
-----------------
 {ns1bar,ns2bar}
(1 row)

If someone can come up with something better, I&#039;m interested too. :-)]]></description>
		<content:encoded><![CDATA[<p>If you&#8217;re guaranteed not to have conflicting names in different namespaces, this works:</p>
<p>SELECT xpath(<br />
    &#8216;/foo/bar/text()&#8217;,<br />
    (xpath(<br />
        &#8216;/testxml/ns1:foo&#8217;,<br />
        &#8216;baz&#8217;::xml,<br />
        ARRAY[<br />
            ['ns1','http://www.example.com'],<br />
            ['ns2','http://www.example2.com']<br />
        ]<br />
    ))[1]<br />
);<br />
 xpath<br />
&#8212;&#8212;-<br />
 {baz}<br />
(1 row)</p>
<p>However, if there are several, you&#8217;re screwed unless you want all of them or only a number of them but don&#8217;t care which ones:</p>
<p>select xpath(&#8216;/foo/bar/text()&#8217;, xml &#8216;ns1barns2bar&#8217;);<br />
      xpath<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
 {ns1bar,ns2bar}<br />
(1 row)</p>
<p>If someone can come up with something better, I&#8217;m interested too. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Announcing the pci-blackbox: PCI-DSS compliant system with 3-D Secure support, built on PostgreSQL and PL/pgSQL by dominos Uk vouchers</title>
		<link>http://joelonsql.com/2013/04/12/announcing-the-pci-blackbox-pci-dss-compliant-system-with-3-d-secure-support-built-on-postgresql-and-plpgsql/comment-page-1/#comment-457</link>
		<dc:creator><![CDATA[dominos Uk vouchers]]></dc:creator>
		<pubDate>Sat, 11 May 2013 22:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=90#comment-457</guid>
		<description><![CDATA[Valuable information. Lucky me I found your web site by accident, and I am stunned why this twist of fate didn&#039;t came about earlier! I bookmarked it.]]></description>
		<content:encoded><![CDATA[<p>Valuable information. Lucky me I found your web site by accident, and I am stunned why this twist of fate didn&#8217;t came about earlier! I bookmarked it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Announcing the pci-blackbox: PCI-DSS compliant system with 3-D Secure support, built on PostgreSQL and PL/pgSQL by Lorena</title>
		<link>http://joelonsql.com/2013/04/12/announcing-the-pci-blackbox-pci-dss-compliant-system-with-3-d-secure-support-built-on-postgresql-and-plpgsql/comment-page-1/#comment-387</link>
		<dc:creator><![CDATA[Lorena]]></dc:creator>
		<pubDate>Tue, 07 May 2013 23:07:54 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=90#comment-387</guid>
		<description><![CDATA[Just desire to say your article is as astounding.
The clarity in your publish is just cool and that i could assume you are an expert on this subject.
Fine along with your permission allow me to 
take hold of your RSS feed to stay updated 
with coming near near post. Thank you 1,000,000 and 
please keep up the enjoyable work.]]></description>
		<content:encoded><![CDATA[<p>Just desire to say your article is as astounding.<br />
The clarity in your publish is just cool and that i could assume you are an expert on this subject.<br />
Fine along with your permission allow me to<br />
take hold of your RSS feed to stay updated<br />
with coming near near post. Thank you 1,000,000 and<br />
please keep up the enjoyable work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PL/pgSQL #1 annoyance by Vincenzo Romano</title>
		<link>http://joelonsql.com/2013/05/03/plpgsql-1-annoyance/comment-page-1/#comment-365</link>
		<dc:creator><![CDATA[Vincenzo Romano]]></dc:creator>
		<pubDate>Mon, 06 May 2013 14:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=158#comment-365</guid>
		<description><![CDATA[While it looks like you store the balances, I decided to store the changes in the amounts (money or goods it doesn&#039;t matter) to later query for the balances. I need to keep track of every single change for both full history and for possible &quot;undoing&quot;. Just like you can see in &quot;double entry bookkeeping&quot;.
As extra benefits I don&#039;t need to VACUUM those tables and I don&#039;t have the UPDATE/DELETE issues you mentioned. And I can also make back- and forth- dated changes.
It&#039;s a completely different approach.]]></description>
		<content:encoded><![CDATA[<p>While it looks like you store the balances, I decided to store the changes in the amounts (money or goods it doesn&#8217;t matter) to later query for the balances. I need to keep track of every single change for both full history and for possible &#8220;undoing&#8221;. Just like you can see in &#8220;double entry bookkeeping&#8221;.<br />
As extra benefits I don&#8217;t need to VACUUM those tables and I don&#8217;t have the UPDATE/DELETE issues you mentioned. And I can also make back- and forth- dated changes.<br />
It&#8217;s a completely different approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PL/pgSQL #1 annoyance by joelonsql</title>
		<link>http://joelonsql.com/2013/05/03/plpgsql-1-annoyance/comment-page-1/#comment-360</link>
		<dc:creator><![CDATA[joelonsql]]></dc:creator>
		<pubDate>Sun, 05 May 2013 22:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=158#comment-360</guid>
		<description><![CDATA[How do you update the balance of an account just doing INSERTs?]]></description>
		<content:encoded><![CDATA[<p>How do you update the balance of an account just doing INSERTs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PL/pgSQL #1 annoyance by Slava</title>
		<link>http://joelonsql.com/2013/05/03/plpgsql-1-annoyance/comment-page-1/#comment-346</link>
		<dc:creator><![CDATA[Slava]]></dc:creator>
		<pubDate>Fri, 03 May 2013 21:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=158#comment-346</guid>
		<description><![CDATA[i see your point. Looks like the goal is to see that update operation updated exactly one row, not &quot;that it updates one row&quot; it makes total sense to me. thanks for clarifying.]]></description>
		<content:encoded><![CDATA[<p>i see your point. Looks like the goal is to see that update operation updated exactly one row, not &#8220;that it updates one row&#8221; it makes total sense to me. thanks for clarifying.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PL/pgSQL #1 annoyance by joelonsql</title>
		<link>http://joelonsql.com/2013/05/03/plpgsql-1-annoyance/comment-page-1/#comment-345</link>
		<dc:creator><![CDATA[joelonsql]]></dc:creator>
		<pubDate>Fri, 03 May 2013 20:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=158#comment-345</guid>
		<description><![CDATA[An UPDATE is _never_ deterministic, you can specify any WHERE-clause, or even skip it entirely, there is still no guarantee your row will be updated. The row might not be there anymore due to a concurrent update or delete. Not likely if you only update including only the primary key in the WHERE-clause. But it is very common to include other conditions in the WHERE-clause, which you expect to hold true, but you want to verify them, and if any of the conditions would be false, you want the update to fail and raise an error. This is why you need to check if the update did in fact update the row.]]></description>
		<content:encoded><![CDATA[<p>An UPDATE is _never_ deterministic, you can specify any WHERE-clause, or even skip it entirely, there is still no guarantee your row will be updated. The row might not be there anymore due to a concurrent update or delete. Not likely if you only update including only the primary key in the WHERE-clause. But it is very common to include other conditions in the WHERE-clause, which you expect to hold true, but you want to verify them, and if any of the conditions would be false, you want the update to fail and raise an error. This is why you need to check if the update did in fact update the row.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PL/pgSQL #1 annoyance by Slava</title>
		<link>http://joelonsql.com/2013/05/03/plpgsql-1-annoyance/comment-page-1/#comment-344</link>
		<dc:creator><![CDATA[Slava]]></dc:creator>
		<pubDate>Fri, 03 May 2013 20:36:41 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=158#comment-344</guid>
		<description><![CDATA[I don&#039;t really understand the usefulness of this option.
Usually you update the rows which conform to particular criteria.
Now, if you want to update just *one* row and you cannot specify deterministic criteria in &quot;where&quot; clause, the next question would which one row of the dataset you&#039;re updating?
imho, such non-deterministic should be left out of the database..]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t really understand the usefulness of this option.<br />
Usually you update the rows which conform to particular criteria.<br />
Now, if you want to update just *one* row and you cannot specify deterministic criteria in &#8220;where&#8221; clause, the next question would which one row of the dataset you&#8217;re updating?<br />
imho, such non-deterministic should be left out of the database..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PL/pgSQL #1 annoyance by Vincenzo Romano</title>
		<link>http://joelonsql.com/2013/05/03/plpgsql-1-annoyance/comment-page-1/#comment-342</link>
		<dc:creator><![CDATA[Vincenzo Romano]]></dc:creator>
		<pubDate>Fri, 03 May 2013 18:08:02 +0000</pubDate>
		<guid isPermaLink="false">http://joelonsql.com/?p=158#comment-342</guid>
		<description><![CDATA[In OLTP I never use UPDATEs or DELETEs. Just INSERTs.  This solves also my issues with undoing and history.]]></description>
		<content:encoded><![CDATA[<p>In OLTP I never use UPDATEs or DELETEs. Just INSERTs.  This solves also my issues with undoing and history.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
