<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Navigator&#039;s Quarters &#187; Database</title>
	<atom:link href="http://nq.garychambers.com/category/Database/feed/" rel="self" type="application/rss+xml" />
	<link>http://nq.garychambers.com</link>
	<description>Technology, current events, astronomy, and sailing and navigation.  Deo Vindice.</description>
	<lastBuildDate>Sat, 13 Apr 2013 02:35:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How Long Will a Bigserial Sequence Last?</title>
		<link>http://nq.garychambers.com/2011/09/how-long-will-a-bigserial-sequence-last/</link>
		<comments>http://nq.garychambers.com/2011/09/how-long-will-a-bigserial-sequence-last/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 03:57:40 +0000</pubDate>
		<dc:creator>Gary Chambers</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://nq.garychambers.com/?p=136</guid>
		<description><![CDATA[I was curious about how long I could use a bigserial sequence before having it rollover, so I decided to investigate it. As a reminder, the range of the bigserial datatype is 1 to 9,223,372,036,854,775,807 (that&#8217;s nine quintillion two hundred &#8230; <a href="http://nq.garychambers.com/2011/09/how-long-will-a-bigserial-sequence-last/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I was curious about how long I could use a bigserial sequence before having it rollover, so I decided to investigate it.</p>
<p>As a reminder, the range of the bigserial datatype is 1 to 9,223,372,036,854,775,807 (that&#8217;s <strong>nine quintillion two hundred twenty-three quadrillion three hundred seventy-two trillion thirty-six billion eight hundred fifty-four million seven hundred seventy-five thousand eight hundred seven</strong>) or, roughly, <strong>10<sup>18.96</sup></strong>.  Given the following:</p>
<ul>
<li>Number of inserts per second: <strong>1,000</strong></li>
<li>Number of seconds per year: 365 * 24 * 60 * 60 (365 days per year, 24 hours per day, 60 minutes per hour, 60 seconds per minute) = <strong>31,536,000</strong></li>
</ul>
<p>It would take:</p>
<blockquote><p>9,223,372,036,854,775,807 / 1,000 / 31,536,000 = <strong>292,471,208.678 years</strong></p></blockquote>
<p>Loosely translated, that&#8217;s 292.5 million years.  If this were going to happen to your database today, you would have had to begin your 1,000 inserts per second sometime between the time <em>when the plants, vertebrates, and invertebrates had all left the oceans</em> and began living on land and <em>when the dinosaurs inhabited the planet</em>.</p>
<p>If you&#8217;re worried about exhausting your bigserial sequence, I hope this information will put your mind at-ease.</p>
]]></content:encoded>
			<wfw:commentRss>http://nq.garychambers.com/2011/09/how-long-will-a-bigserial-sequence-last/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PostgreSQL C Function Interface to GNU pwgen</title>
		<link>http://nq.garychambers.com/2011/09/postgresql-c-function-interface-to-gnu-pwgen/</link>
		<comments>http://nq.garychambers.com/2011/09/postgresql-c-function-interface-to-gnu-pwgen/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 01:20:19 +0000</pubDate>
		<dc:creator>Gary Chambers</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://nq.garychambers.com/?p=122</guid>
		<description><![CDATA[I&#8217;ve written a PostgreSQL C set-returning function (SRF) to generate passwords using the GNU pwgen utility.  It&#8217;s a simple example of incorporating an external library (pwgen 2.06 in this case) that, to me, isn&#8217;t worth the effort of writing in &#8230; <a href="http://nq.garychambers.com/2011/09/postgresql-c-function-interface-to-gnu-pwgen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve written a PostgreSQL C set-returning function (SRF) to generate passwords using the GNU pwgen utility.  It&#8217;s a simple example of incorporating an external library (pwgen 2.06 in this case) that, to me, isn&#8217;t worth the effort of writing in any of the other procedural languages (i.e. reinventing the wheel).  It can be installed as a PostgreSQL 9.1 extension, if you&#8217;re able to do so.  Feel free to grab the source code at <a href="git://git.gogca.com/gwc/pgpwgen.git">git://git.gogca.com/gwc/pgpwgen.git</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nq.garychambers.com/2011/09/postgresql-c-function-interface-to-gnu-pwgen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
