<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Postgres on Logan's Nest</title><link>https://blog.han.life/tags/postgres/</link><description>Recent content in Postgres on Logan's Nest</description><generator>Hugo</generator><language>en-au</language><lastBuildDate>Thu, 05 Feb 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.han.life/tags/postgres/index.xml" rel="self" type="application/rss+xml"/><item><title>Query of the century</title><link>https://blog.han.life/posts/2015/2015-02-05-query-of-the-century/</link><pubDate>Thu, 05 Feb 2015 00:00:00 +0000</pubDate><guid>https://blog.han.life/posts/2015/2015-02-05-query-of-the-century/</guid><description>&lt;p&gt;My co-worker showed me this today and it&amp;rsquo;s just gorgeous.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;BEGIN; CREATE TABLE xyz_tmp (LIKE xyz INCLUDING ALL); COPY xyz_tmp FROM STDIN; ALTER TABLE xyz RENAME TO xyz_old; ALTER TABLE xyz_tmp RENAME TO xyz; DROP TABLE xyz_old; COMMIT;&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Bacula daily (or weekly) email report for postgres DB</title><link>https://blog.han.life/posts/2014/2014-01-21-bacula-daily-weekly-email-report-postgres-db/</link><pubDate>Tue, 21 Jan 2014 00:00:00 +0000</pubDate><guid>https://blog.han.life/posts/2014/2014-01-21-bacula-daily-weekly-email-report-postgres-db/</guid><description>&lt;p&gt;This now moved to: &lt;a href="https://github.com/logan-han/sysadmin_stuffs/blob/master/bacula_report.sh"&gt;https://github.com/logan-han/sysadmin_stuffs/blob/master/bacula_report.sh&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>