<?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: PostgreSQL, SQLAlchemy, Dropping all tables and sequences</title>
	<atom:link href="http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/</link>
	<description>Never knowingly knowing narwhals</description>
	<lastBuildDate>Tue, 16 Feb 2010 13:25:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sequnecen l?schen - PG-Forum.de</title>
		<link>http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/comment-page-1/#comment-2528</link>
		<dc:creator>Sequnecen l?schen - PG-Forum.de</dc:creator>
		<pubDate>Tue, 10 Nov 2009 12:40:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/#comment-2528</guid>
		<description>[...] * from information_schema.sequences; mit Hilfe von google bei www.luckydonkey.com [...]</description>
		<content:encoded><![CDATA[<p>[...] * from information_schema.sequences; mit Hilfe von google bei <a href="http://www.luckydonkey.com" rel="nofollow">http://www.luckydonkey.com</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: table coverzz</title>
		<link>http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/comment-page-1/#comment-2342</link>
		<dc:creator>table coverzz</dc:creator>
		<pubDate>Mon, 15 Sep 2008 20:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/#comment-2342</guid>
		<description>oh i guess that i what i was doing wrong Rick thanks for the tip</description>
		<content:encoded><![CDATA[<p>oh i guess that i what i was doing wrong Rick thanks for the tip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Copeland</title>
		<link>http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/comment-page-1/#comment-1990</link>
		<dc:creator>Rick Copeland</dc:creator>
		<pubDate>Mon, 07 Jan 2008 20:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/#comment-1990</guid>
		<description>drop_all() doesn&#039;t actually work if there are circular ForeignKey dependences in PostgreSQL.  I have a short explanation (and quick fix) at http://pythonisito.blogspot.com/2008/01/cascading-drop-table-with-sqlalchemy.html</description>
		<content:encoded><![CDATA[<p>drop_all() doesn&#8217;t actually work if there are circular ForeignKey dependences in PostgreSQL.  I have a short explanation (and quick fix) at <a href="http://pythonisito.blogspot.com/2008/01/cascading-drop-table-with-sqlalchemy.html" rel="nofollow">http://pythonisito.blogspot.com/2008/01/cascading-drop-table-with-sqlalchemy.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike bayer</title>
		<link>http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/comment-page-1/#comment-1975</link>
		<dc:creator>mike bayer</dc:creator>
		<pubDate>Mon, 03 Dec 2007 04:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/2007/11/23/postgresql-sqlalchemy-dropping-all-tables-and-sequences/#comment-1975</guid>
		<description>hiya -

sqlalchemy drops tables in order of dependency, where by &quot;dependency&quot; we mean foreign key dependencies..you can declare these explicitly using the ForeignKey construct.  But table reflection already uses the PG system tables to get this information automatically (we used to use information_schema but it proved to be too slow and quirky).  this feature can be used to drop all tables in the correct order like so:

engine = create_engine(&quot;posgres://user:pass@host/db&quot;)
meta = MetaData(engine)
meta.reflect()
meta.drop_all()

however, it currently doesn&#039;t cover sequences except for those which were created implicitly using SERIAL columns...we might add support for reflection of external sequences eventually.

- mike</description>
		<content:encoded><![CDATA[<p>hiya -</p>
<p>sqlalchemy drops tables in order of dependency, where by &#8220;dependency&#8221; we mean foreign key dependencies..you can declare these explicitly using the ForeignKey construct.  But table reflection already uses the PG system tables to get this information automatically (we used to use information_schema but it proved to be too slow and quirky).  this feature can be used to drop all tables in the correct order like so:</p>
<p>engine = create_engine(&#8220;posgres://user:pass@host/db&#8221;)<br />
meta = MetaData(engine)<br />
meta.reflect()<br />
meta.drop_all()</p>
<p>however, it currently doesn&#8217;t cover sequences except for those which were created implicitly using SERIAL columns&#8230;we might add support for reflection of external sequences eventually.</p>
<p>- mike</p>
]]></content:encoded>
	</item>
</channel>
</rss>
