<?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: Base36 Conversion in PostgreSQL</title>
	<atom:link href="http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/</link>
	<description></description>
	<lastBuildDate>Thu, 11 Aug 2011 13:49:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jamie</title>
		<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/comment-page-1/#comment-742</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Thu, 11 Aug 2011 13:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rightbrainnetworks.com/?p=148#comment-742</guid>
		<description>Thanks for the feedback!</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/comment-page-1/#comment-741</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Thu, 11 Aug 2011 13:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rightbrainnetworks.com/?p=148#comment-741</guid>
		<description>Another limitation of this code is - it supports only half of possbible bigint values (only positive ones). When ret overflows - function returns exception.</description>
		<content:encoded><![CDATA[<p>Another limitation of this code is &#8211; it supports only half of possbible bigint values (only positive ones). When ret overflows &#8211; function returns exception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/comment-page-1/#comment-740</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 10 Aug 2011 10:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rightbrainnetworks.com/?p=148#comment-740</guid>
		<description>Your base36_decode contains bug in string:

ret := ret + (val * (36 ^ i));

For large numbers (for example,
select * from base36_decode(&#039;324adc6a6ds&#039;));

it returns
ERROR:  invalid input syntax for integer: &quot;1.11836923491136e+16&quot;
CONTEXT:  PL/pgSQL function &quot;base36_decode&quot; line 17 at assignment

Mentioned string must be fixed as follows:
ret := ret + (val * (36 ^ i))::bigint;

After that all works ok, thanks for sharing your code.</description>
		<content:encoded><![CDATA[<p>Your base36_decode contains bug in string:</p>
<p>ret := ret + (val * (36 ^ i));</p>
<p>For large numbers (for example,<br />
select * from base36_decode(&#8217;324adc6a6ds&#8217;));</p>
<p>it returns<br />
ERROR:  invalid input syntax for integer: &#8220;1.11836923491136e+16&#8243;<br />
CONTEXT:  PL/pgSQL function &#8220;base36_decode&#8221; line 17 at assignment</p>
<p>Mentioned string must be fixed as follows:<br />
ret := ret + (val * (36 ^ i))::bigint;</p>
<p>After that all works ok, thanks for sharing your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PK</title>
		<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/comment-page-1/#comment-734</link>
		<dc:creator>PK</dc:creator>
		<pubDate>Sat, 28 May 2011 16:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rightbrainnetworks.com/?p=148#comment-734</guid>
		<description>Would you have a C equivalent of this? Doing this in pl/pgsql is going to be a major hit. 

Thanks!</description>
		<content:encoded><![CDATA[<p>Would you have a C equivalent of this? Doing this in pl/pgsql is going to be a major hit. </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/comment-page-1/#comment-696</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Wed, 04 Aug 2010 16:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rightbrainnetworks.com/?p=148#comment-696</guid>
		<description>Certainly.  You may use it in anyway you wish; no attribution is necessary.  Though, as I mentioned in the original posting, you may want to test the performance of the functions or maybe even reconsider whether this is a task that should be done within the DB.</description>
		<content:encoded><![CDATA[<p>Certainly.  You may use it in anyway you wish; no attribution is necessary.  Though, as I mentioned in the original posting, you may want to test the performance of the functions or maybe even reconsider whether this is a task that should be done within the DB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P</title>
		<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/comment-page-1/#comment-695</link>
		<dc:creator>P</dc:creator>
		<pubDate>Tue, 03 Aug 2010 22:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rightbrainnetworks.com/?p=148#comment-695</guid>
		<description>May I use these in a commercial project? If so may I make changes if attribution is provided?</description>
		<content:encoded><![CDATA[<p>May I use these in a commercial project? If so may I make changes if attribution is provided?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P</title>
		<link>http://www.rightbrainnetworks.com/blog/base36-conversion-in-postgresql/comment-page-1/#comment-694</link>
		<dc:creator>P</dc:creator>
		<pubDate>Tue, 03 Aug 2010 22:39:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rightbrainnetworks.com/?p=148#comment-694</guid>
		<description>May I use this in some commercial work I&#039;ve been doing? If so may I make changes if attribution is given?</description>
		<content:encoded><![CDATA[<p>May I use this in some commercial work I&#8217;ve been doing? If so may I make changes if attribution is given?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

