<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>Dryice Liu's Blog &#187; postgresql</title>
	<link>http://dryice.name/blog</link>
	<description></description>
	<pubDate>Tue, 31 Aug 2010 12:01:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>mysql tip: finding duplicated records</title>
		<link>http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/</link>
		<comments>http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 02:43:00 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[postgresql]]></category>

		<category><![CDATA[misc]]></category>
<category>mysql</category><category>tip</category>
		<guid isPermaLink="false">http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/</guid>
		<description><![CDATA[Found here: http://mysql-tips.blogspot.com/2005/04/mysql-find-duplicate-repords-example.html
select address, count(address) as cnt
from mailing_list
group by address
having cnt &#62; 1
order by cnt;

Share This
]]></description>
			<content:encoded><![CDATA[<p>Found here: http://mysql-tips.blogspot.com/2005/04/mysql-find-duplicate-repords-example.html</p>
<p>select address, count(address) as cnt<br />
from mailing_list<br />
group by address<br />
having cnt &gt; 1<br />
order by cnt;</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=872&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_872" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/feed/</wfw:commentRss>
		</item>
		<item>
		<title>sqlite doesn&#8217;t support more than one primary key in one table</title>
		<link>http://dryice.name/blog/postgresql/sqlite-doesnt-support-more-than-one-primary-key-in-one-table/</link>
		<comments>http://dryice.name/blog/postgresql/sqlite-doesnt-support-more-than-one-primary-key-in-one-table/#comments</comments>
		<pubDate>Mon, 28 Aug 2006 13:03:00 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://dryice.name/wordpress/index.php/uncategorized/sqlite-doesnt-support-more-than-one-primary-key-in-one-table/</guid>
		<description><![CDATA[This cost me several hours today.
Postgresql support multiple primary keys in one table, and I took granted that sqlite does the same thing when I did some prototype today.
And they have a good reason explained in the SQLite CVSTrac.
The odd thing is, if I specify two primary keys in sqlite, it won&#8217;t complain when creating [...]]]></description>
			<content:encoded><![CDATA[<p>This cost me several hours today.</p>
<p>Postgresql support multiple primary keys in one table, and I took granted that sqlite does the same thing when I did some prototype today.</p>
<p>And they have a good reason explained in the <a href="http://www.sqlite.org/cvstrac/wiki?p=UnsupportedSql">SQLite CVSTrac</a>.</p>
<p>The odd thing is, if I specify two primary keys in sqlite, it won&#8217;t complain when creating the table, but complains that one of the primary key can&#8217;t be NULL when I do a insert. This lead me to a wrong way <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>The solution is easy when I found the problem: use the unique keyword instead of primary key.</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=665&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_665" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/postgresql/sqlite-doesnt-support-more-than-one-primary-key-in-one-table/feed/</wfw:commentRss>
		</item>
		<item>
		<title>don&#8217;t create table with name ends &#34;_seq&#34;</title>
		<link>http://dryice.name/blog/postgresql/dont-create-table-with-name-ends-_seq/</link>
		<comments>http://dryice.name/blog/postgresql/dont-create-table-with-name-ends-_seq/#comments</comments>
		<pubDate>Sun, 13 Jun 2004 22:43:00 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://dryice.name/wordpress/index.php/uncategorized/dont-create-table-with-name-ends-_seq/</guid>
		<description><![CDATA[postgresql use this kind of table to keep track of sequence.

Share This
]]></description>
			<content:encoded><![CDATA[<p>postgresql use this kind of table to keep track of sequence.</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=827&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_827" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/postgresql/dont-create-table-with-name-ends-_seq/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
