<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>madssj.com - Latest Comments</title><link>http://madssjcom.disqus.com/</link><description></description><atom:link href="https://madssjcom.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 23 Jun 2016 12:25:03 -0000</lastBuildDate><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-2746591880</link><description>&lt;p&gt;I got the same error message with one of my databases. Its name included a dash, e.g. `my-database`.&lt;/p&gt;&lt;p&gt;Iff a database name includes dash characters, `pg_dumpall` will generate a `\connect` statement with its database name parameter in double quotes, e.g. the full dump will won't include the statement `\connect my-database`, but `\connect "my-database"`.&lt;/p&gt;&lt;p&gt;The solution / workaround then is to run `pg_extract_db` with the database name in (shell-escaped) double quotes:&lt;/p&gt;&lt;p&gt;pgx_extract_db big-dump-file.sql \"my-database\" &amp;gt;my-database.sql&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eduard von Feek</dc:creator><pubDate>Thu, 23 Jun 2016 12:25:03 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-1177733690</link><description>&lt;p&gt;Thx for the linkback!! Cheers&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rune_kg</dc:creator><pubDate>Thu, 26 Dec 2013 19:19:29 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-1165482417</link><description>&lt;p&gt;It worked wonderfully in 2010, the dump format might have changed. I'll add a link in the top for your updated gist - thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">madssj</dc:creator><pubDate>Mon, 16 Dec 2013 05:22:14 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-1161214811</link><description>&lt;p&gt;Thank you so much for this! On my system it did not work for the last database in the file, because "end_point" would be empty. I also needed to remove OWNER,REVOKE and GRANT commands to make the restore work with other database credentials. I did just that, added an install command, a list dbs command and put it in a gist here: &lt;a href="https://gist.github.com/runekaagaard/7924963" rel="nofollow noopener" target="_blank" title="https://gist.github.com/runekaagaard/7924963"&gt;https://gist.github.com/run...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You saved me much hassle, and the cool thing about your solution compared to the other floating around the interwebs is that its actually fast enough for large files too! Great work!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rune_kg</dc:creator><pubDate>Fri, 13 Dec 2013 05:26:10 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-918429960</link><description>&lt;p&gt;Then it can't find a line that says "\connect dbname" in your dump file.&lt;/p&gt;&lt;p&gt;Feel free to tinker with the script.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">madssj</dc:creator><pubDate>Tue, 04 Jun 2013 04:23:42 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-917773444</link><description>&lt;p&gt;I'm not sure why, but I'm getting, "error: start or end not found" when I run this script.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brent O'Connor</dc:creator><pubDate>Mon, 03 Jun 2013 12:20:19 -0000</pubDate></item><item><title>Re: Django &amp;#8211; sharing a memcached instance</title><link>https://madssj.com/blog/2009/06/23/django-sharing-a-memcached-instance/#comment-707178774</link><description>&lt;p&gt;Agreed. I've updated the post to reflect the fact, that django 1.3 was released last night.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mads Sülau Jørgensen</dc:creator><pubDate>Wed, 23 Mar 2011 12:08:55 -0000</pubDate></item><item><title>Re: Django &amp;#8211; sharing a memcached instance</title><link>https://madssj.com/blog/2009/06/23/django-sharing-a-memcached-instance/#comment-707178771</link><description>&lt;p&gt;The patch that Curious User linked to has been approved in Django 1.3, which should be out shortly.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://code.djangoproject.com/changeset/14623" rel="nofollow noopener" target="_blank" title="http://code.djangoproject.com/changeset/14623"&gt;http://code.djangoproject.c...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://docs.djangoproject.com/en/dev/topics/cache/#cache-key-prefixing" rel="nofollow noopener" target="_blank" title="http://docs.djangoproject.com/en/dev/topics/cache/#cache-key-prefixing"&gt;http://docs.djangoproject.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew Ash</dc:creator><pubDate>Tue, 22 Mar 2011 20:20:02 -0000</pubDate></item><item><title>Re: Asynchronous socket server in python</title><link>https://madssj.com/blog/2008/02/21/asynchronous-socket-server-in-python/#comment-707178664</link><description>&lt;p&gt;True. &lt;code&gt;conn&lt;/code&gt; should be &lt;code&gt;sock&lt;/code&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mads Sülau Jørgensen</dc:creator><pubDate>Mon, 01 Nov 2010 08:32:20 -0000</pubDate></item><item><title>Re: Asynchronous socket server in python</title><link>https://madssj.com/blog/2008/02/21/asynchronous-socket-server-in-python/#comment-707178660</link><description>&lt;p&gt;error in line 22:&lt;br&gt;asynchat.async_chat.&lt;strong&gt;init&lt;/strong&gt;(self, sock=conn)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">wildman</dc:creator><pubDate>Sun, 31 Oct 2010 18:21:17 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-707178676</link><description>&lt;p&gt;You're very welcome.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mads Sülau Jørgensen</dc:creator><pubDate>Thu, 14 Oct 2010 17:33:38 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-707178674</link><description>&lt;p&gt;You just saved me a lot of work. Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kai</dc:creator><pubDate>Thu, 14 Oct 2010 08:04:33 -0000</pubDate></item><item><title>Re: Django &amp;#8211; sharing a memcached instance</title><link>https://madssj.com/blog/2009/06/23/django-sharing-a-memcached-instance/#comment-707178770</link><description>&lt;p&gt;Oh, that's even better!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I'll stick it in the post, thanks again :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mads Sülau Jørgensen</dc:creator><pubDate>Thu, 01 Jul 2010 10:33:27 -0000</pubDate></item><item><title>Re: Django &amp;#8211; sharing a memcached instance</title><link>https://madssj.com/blog/2009/06/23/django-sharing-a-memcached-instance/#comment-707178768</link><description>&lt;p&gt;Thanks for your quick reply!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Note a patch has been submitted: &lt;a href="http://code.djangoproject.com/ticket/13795" rel="nofollow noopener" target="_blank" title="http://code.djangoproject.com/ticket/13795"&gt;http://code.djangoproject.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Curious User</dc:creator><pubDate>Thu, 01 Jul 2010 10:31:30 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-707178672</link><description>&lt;p&gt;Right, replaced with &lt;code&gt;echo "foo" &amp;gt;&amp;amp;2&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mads Sülau Jørgensen</dc:creator><pubDate>Thu, 01 Jul 2010 10:29:13 -0000</pubDate></item><item><title>Re: Django &amp;#8211; sharing a memcached instance</title><link>https://madssj.com/blog/2009/06/23/django-sharing-a-memcached-instance/#comment-707178766</link><description>&lt;p&gt;If you set &lt;code&gt;CACHE_MIDDLEWARE_KEY_PREFIX&lt;/code&gt; and use the &lt;code&gt;memcached_key_prefix&lt;/code&gt; cache backend, both will add a key to the cache key.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So, if the &lt;code&gt;CacheMiddleware&lt;/code&gt; were to insert a key called &lt;code&gt;frontpage&lt;/code&gt;, it would then prefix it with the above setting, and pass it along to the cache backend, which then again prefixes the key. You then end up with a key called &lt;code&gt;CACHE_MIDDLEWARE_KEY_PREFIX + cache_backend_prefix + cache_key&lt;/code&gt; which is suboptimal.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mads Sülau Jørgensen</dc:creator><pubDate>Thu, 01 Jul 2010 10:26:36 -0000</pubDate></item><item><title>Re: Django &amp;#8211; sharing a memcached instance</title><link>https://madssj.com/blog/2009/06/23/django-sharing-a-memcached-instance/#comment-707178762</link><description>&lt;p&gt;Please explain "kind of conflict".&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I appreciate you taking the time to post this, as have countless other non-commenters.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Curious User</dc:creator><pubDate>Thu, 01 Jul 2010 10:00:15 -0000</pubDate></item><item><title>Re: Extracting a single database from a pg_dumpall PostgreSQL dump</title><link>https://www.madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/#comment-707178670</link><description>&lt;p&gt;Redirection to stderr with "&amp;gt; 2" is not working.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">J. Christopher Pereira</dc:creator><pubDate>Fri, 25 Jun 2010 23:57:01 -0000</pubDate></item><item><title>Re: Mercurial trac commit hook</title><link>https://madssj.com/blog/2008/10/13/mercurial-trac-commit-hook/#comment-707178745</link><description>&lt;p&gt;Thanks for this plugin.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I have try this plugin without success with Trac0.12-multirepos &lt;br&gt;I have this error :&lt;br&gt;Traceback (most recent call last):&lt;br&gt;  File "/usr/lib/python2.4/site-packages/&lt;a href="http://trachook.py" rel="nofollow noopener" target="_blank" title="trachook.py"&gt;trachook.py&lt;/a&gt;", line 210, in hook&lt;br&gt;    trac_hook.update(c, r, url)&lt;br&gt;  File "/usr/lib/python2.4/site-packages/&lt;a href="http://trachook.py" rel="nofollow noopener" target="_blank" title="trachook.py"&gt;trachook.py&lt;/a&gt;", line 88, in update&lt;br&gt;    self.env.href = Href(url)&lt;br&gt;TypeError: 'str' object is not callable&lt;br&gt;error: changegroup hook raised an exception: 'str' object is not callable&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;???&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pascal</dc:creator><pubDate>Thu, 26 Nov 2009 18:01:25 -0000</pubDate></item><item><title>Re: Actionscript 3 &amp;#8211; posting XML data with URLLoader</title><link>https://direct.madssj.com/blog/2008/07/30/actionscript-3-posting-xml-data-with-urlloader/#comment-707178718</link><description>&lt;p&gt;Jeg kunne godt tænke mig et php script hvor jeg kunne rette i min xml :P&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Niklas</dc:creator><pubDate>Fri, 13 Nov 2009 10:03:32 -0000</pubDate></item><item><title>Re: Mercurial trac commit hook</title><link>https://madssj.com/blog/2008/10/13/mercurial-trac-commit-hook/#comment-707178744</link><description>&lt;p&gt;Hmm, just copying the &lt;a href="http://trachook.py" rel="nofollow noopener" target="_blank" title="trachook.py"&gt;trachook.py&lt;/a&gt; to the place gave me an permission error, that normal users which checkin doesn't have the permission to change /srv/trac/myProject files. How did you solved this??&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">math</dc:creator><pubDate>Fri, 30 Oct 2009 14:35:07 -0000</pubDate></item><item><title>Re: Building postgresql8x and psycopg2 for x86_64 and i386 on Snow Leopard (OS X 10.6)</title><link>https://madssj.com/blog/2009/09/03/building-postgresql8x-x86_64-i386-snow-leopard/#comment-707178782</link><description>&lt;p&gt;Make sure you have (at least for me) 10.4 development tools turned on when installing Xcode.  Otherwise I got errors like:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;ld: library not found for -lbundle1.o&lt;br&gt;collect2: ld returned 1 exit status&lt;br&gt;error: command 'gcc-4.0' failed with exit status 1&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Adam Nelson</dc:creator><pubDate>Tue, 13 Oct 2009 22:17:05 -0000</pubDate></item><item><title>Re: Django compatible PyAMF test client</title><link>https://www.madssj.com/blog/2009/04/21/django-compatible-pyamf-test-client/#comment-707178747</link><description>&lt;p&gt;This is great. I'm surprised it wasn't already there.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sam Ahn</dc:creator><pubDate>Fri, 11 Sep 2009 14:02:16 -0000</pubDate></item><item><title>Re: Building postgresql8x and psycopg2 for x86_64 and i386 on Snow Leopard (OS X 10.6)</title><link>https://madssj.com/blog/2009/09/03/building-postgresql8x-x86_64-i386-snow-leopard/#comment-707178781</link><description>&lt;p&gt;@Rune, Hm, I was either using bash or zsh at the time (probably bash). I'll correct it by removing the checks, chances are they're not needed anyway.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mads Sülau Jørgensen</dc:creator><pubDate>Fri, 04 Sep 2009 08:18:37 -0000</pubDate></item><item><title>Re: Building postgresql8x and psycopg2 for x86_64 and i386 on Snow Leopard (OS X 10.6)</title><link>https://madssj.com/blog/2009/09/03/building-postgresql8x-x86_64-i386-snow-leopard/#comment-707178779</link><description>&lt;p&gt;What shell are you using? I get a syntax like error when I try to run: [ -f "&lt;a href="http://ld.sh" rel="nofollow noopener" target="_blank" title="ld.sh"&gt;ld.sh&lt;/a&gt;" -a -n -f "files/&lt;a href="http://ld.sh" rel="nofollow noopener" target="_blank" title="ld.sh"&gt;ld.sh&lt;/a&gt;" ] &amp;amp;&amp;amp; sudo mv &lt;a href="http://ld.sh" rel="nofollow noopener" target="_blank" title="ld.sh"&gt;ld.sh&lt;/a&gt; files/&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;It fails with the error message [: too many arguments.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Also, unless I have the hole permission things wrong you need a sudo in front of the "mkdir files".&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rune Bromer</dc:creator><pubDate>Fri, 04 Sep 2009 06:59:30 -0000</pubDate></item></channel></rss>