<?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>Florian Helmberger's blog</title>
	<atom:link href="http://www.laudatio.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laudatio.com/wordpress</link>
	<description>laudatio.com</description>
	<lastBuildDate>Mon, 23 Nov 2009 21:07:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to remove entries from Firefox Smartbar</title>
		<link>http://www.laudatio.com/wordpress/2009/11/23/how-to-remove-entries-from-firefox-smartbar/</link>
		<comments>http://www.laudatio.com/wordpress/2009/11/23/how-to-remove-entries-from-firefox-smartbar/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:51:35 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Diverses]]></category>
		<category><![CDATA[awesomebar]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[entries]]></category>
		<category><![CDATA[entry]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[moz_places]]></category>
		<category><![CDATA[places.sqlite]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[smartbar]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/?p=126</guid>
		<description><![CDATA[I really got to love the Smartbar aka Awesomebar, introduced in Firefox 3. But in some way it annoyed me that there is no really obvious way to remove entries from it. Sure, after a bit of research via Google I found out, that you can press shift+delete while hovering with your mouse over an [...]]]></description>
			<content:encoded><![CDATA[<p>I really got to love the Smartbar aka Awesomebar, introduced in Firefox 3. But in some way it annoyed me that there is no really obvious way to remove entries from it. Sure, after a bit of research via Google I found out, that you can press shift+delete while hovering with your mouse over an entry. But this doesn't help much if you want to get rid of all entries for a given domain or containing a specific keyword - so this may get kind of tedious. It also seems, that there isn't even a single Add-on which can deal with this. If I missed something, please drop me a quick note.</p>
<p>Nevertheless, being a part-time hacker I also couldn't overlook, that Firefox is saving lots of the data it stores on your workstation in SQLite databases. And where is SQL, there is rescue!</p>
<p>So, first step - where are those database files? On Mac OS X, they are usually located in</p>
<pre>~/Library/Application\ Support/Firefox/Profiles/&lt;some string&gt;.default/</pre>
<p>The one you want to hassle with is named</p>
<pre>places.sqlite</pre>
<p>Note, from now on you have to work while Firefox isn't running. Otherwise, the SQLite database is locked and you can't access it. But let's get to business - we're interested in the following table:</p>
<pre class="bash">fh$ sqlite3 places.sqlite
SQLite version <span style="color: #000000;">3.4</span><span style="color: #000000;">.0</span>
Enter <span style="color: #ff0000;">&quot;.help&quot;</span> <span style="color: #000000; font-weight: bold;">for</span> instructions
sqlite&gt; .schema moz_places
CREATE TABLE moz_places <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">id</span> INTEGER PRIMARY KEY, url LONGVARCHAR, \
  title LONGVARCHAR, rev_host LONGVARCHAR, visit_count INTEGER DEFAULT <span style="color: #000000;">0</span>, \
  hidden INTEGER DEFAULT <span style="color: #000000;">0</span> NOT NULL, typed INTEGER DEFAULT <span style="color: #000000;">0</span> NOT NULL, \
  favicon_id INTEGER, frecency INTEGER DEFAULT <span style="color: #000000;">-1</span> NOT NULL, \
  last_visit_date INTEGER<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
CREATE INDEX moz_places_faviconindex ON moz_places <span style="color: #7a0874; font-weight: bold;">&#40;</span>favicon_id<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
CREATE INDEX moz_places_frecencyindex ON moz_places <span style="color: #7a0874; font-weight: bold;">&#40;</span>frecency<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
CREATE INDEX moz_places_hostindex ON moz_places <span style="color: #7a0874; font-weight: bold;">&#40;</span>rev_host<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
CREATE INDEX moz_places_lastvisitdateindex ON moz_places <span style="color: #7a0874; font-weight: bold;">&#40;</span>last_visit_date<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
CREATE UNIQUE INDEX moz_places_url_uniqueindex ON moz_places <span style="color: #7a0874; font-weight: bold;">&#40;</span>url<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
CREATE INDEX moz_places_visitcount ON moz_places <span style="color: #7a0874; font-weight: bold;">&#40;</span>visit_count<span style="color: #7a0874; font-weight: bold;">&#41;</span>;
sqlite&gt;</pre>
<p>The url column holds the complete URL Firefox shows in the Smartbar, so we can simply write a quick query:</p>
<pre class="sql">sqlite&gt; <span style="color: #993333; font-weight: bold;">SELECT</span> url <span style="color: #993333; font-weight: bold;">FROM</span> moz_places <span style="color: #993333; font-weight: bold;">WHERE</span> url <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%bbc.co.uk%'</span>;
&nbsp;
http://news.bbc.co.uk/go/rss/-/<span style="color: #cc66cc;">2</span>/hi/middle_east/<span style="color: #cc66cc;">8372985</span>.stm
&nbsp;
http://news.bbc.co.uk/go/rss/-/<span style="color: #cc66cc;">2</span>/hi/asia-pacific/<span style="color: #cc66cc;">8372795</span>.stm</pre>
<p>If I wanted to get rid of them this query would do:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> moz_places <span style="color: #993333; font-weight: bold;">WHERE</span> url <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%bbc.co.uk%'</span>;</pre>
<p>Replace the domain accordingly, backup your places.sqlite before changing anything and you're good.</p>
<p>The location of places.sqlite on other OS:</p>
<p><strong>Windows XP</strong></p>
<pre>C:\Documents and Settings\&lt;username&gt;\Application Data\Mozilla\Firefox\
  Profiles\&lt;profile folder&gt;\places.sqlite</pre>
<p><strong>Windows Vista</strong></p>
<pre>C:\Users\&lt;user&gt;\AppData\Roaming\Mozilla\Firefox\Profiles\
  &lt;profile folder&gt;\places.sqlite</pre>
<p><strong>GNU/Linux</strong></p>
<pre>/home/&lt;user&gt;/.mozilla/firefox/&lt;profile folder&gt;/places.sqlite</pre>
<p>If you're on an OS which doesn't ship with any SQLite interface, go to the SQLite <a href="http://www.sqlite.org/">website</a> and download it. Or, if that is to much hassle for you, there is a Firefox Add-on, called <a href="https://addons.mozilla.org/en-US/firefox/addon/5817">SQLite Manager</a>, which can access and change SQLite databases too. But remember: you have to work on a copy of places.sqlite as the file is locked while Firefox itself is running.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2009/11/23/how-to-remove-entries-from-firefox-smartbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A better CONCAT for PostgreSQL</title>
		<link>http://www.laudatio.com/wordpress/2009/04/01/a-better-concat-for-postgresql/</link>
		<comments>http://www.laudatio.com/wordpress/2009/04/01/a-better-concat-for-postgresql/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 19:36:13 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Diverses]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/?p=120</guid>
		<description><![CDATA[Concatination is one thing you need quite often when working with databases and especially when you have to generate some reports. And even as it seems to be a simple problem looking for an easy solution it's a pithole. The natural way would be to do something like this:
CREATE TABLE persons &#40;
id        SERIAL      PRIMARY KEY,
firstname [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Concatenation">Concatination </a>is one thing you need quite often when working with databases and especially when you have to generate some reports. And even as it seems to be a simple problem looking for an easy solution it's a pithole. The natural way would be to do something like this:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> persons <span style="color: #66cc66;">&#40;</span>
id        SERIAL      <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>,
firstname TEXT        <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
surname   TEXT        <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
title     TEXT
<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> persons <span style="color: #66cc66;">&#40;</span>firstname, surname, title<span style="color: #66cc66;">&#41;</span>
  <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Edward'</span>, <span style="color: #ff0000;">'Hyde'</span>, <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> persons <span style="color: #66cc66;">&#40;</span>firstname, surname, title<span style="color: #66cc66;">&#41;</span>
  <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Henry'</span>, <span style="color: #ff0000;">'Jekyll'</span>, <span style="color: #ff0000;">'Dr.'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #993333; font-weight: bold;">SELECT</span> * <span style="color: #993333; font-weight: bold;">FROM</span> persons;
&nbsp;
 id | firstname | surname | title
<span style="color: #808080; font-style: italic;">----+-----------+---------+-------</span>
  <span style="color: #cc66cc;">1</span> | Edward    | Hyde    |
  <span style="color: #cc66cc;">2</span> | Henry     | Jekyll  | Dr.
<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span> rows<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">SELECT</span> title || <span style="color: #ff0000;">' '</span> || firstname || <span style="color: #ff0000;">' '</span> || surname <span style="color: #993333; font-weight: bold;">FROM</span> persons;
&nbsp;
?<span style="color: #993333; font-weight: bold;">COLUMN</span>?
<span style="color: #808080; font-style: italic;">------------------</span>
&nbsp;
Dr. Henry Jekyll
<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span> rows<span style="color: #66cc66;">&#41;</span></pre>
<p>As you see, the row containing the NULL value is omitted. So how to fix that? Of course we might do something like using COALESCE to return at least an empty string instead of a NULL value, but this way we'd get a whitespace we might not want (on the web not that bad because normaly the browser renders multiple whitespace as one).</p>
<p>So, if you research this issue a bit via google you'll find many solutions. From PL/pgSQL CONCAT functions with might handle two, three or four arguments (CONCAT2, CONCAT3, you get the picture) to solutions using custom aggregate functions. But most of them don't care about NULL values and will break.</p>
<p>Let's try this with a simple CONCAT function:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #993333; font-weight: bold;">FUNCTION</span> concat<span style="color: #66cc66;">&#40;</span>text, text, text<span style="color: #66cc66;">&#41;</span> RETURNS text <span style="color: #993333; font-weight: bold;">AS</span> $$
<span style="color: #993333; font-weight: bold;">SELECT</span> $<span style="color: #cc66cc;">1</span> || <span style="color: #ff0000;">' '</span> || $<span style="color: #cc66cc;">2</span> || <span style="color: #ff0000;">' '</span> || $<span style="color: #cc66cc;">3</span>;
$$ <span style="color: #993333; font-weight: bold;">LANGUAGE</span> <span style="color: #ff0000;">'sql'</span>;
&nbsp;
<span style="color: #993333; font-weight: bold;">SELECT</span> CONCAT<span style="color: #66cc66;">&#40;</span>title, firstname, surname<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> persons;
concat
<span style="color: #808080; font-style: italic;">----------------</span>
&nbsp;
Dr. Henry Jekyll
<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span> rows<span style="color: #66cc66;">&#41;</span></pre>
<p>Still, the same problem with the row containing the NULL value.</p>
<p>While looking into this, I ran over the buildin function <a href="http://www.postgresql.org/docs/8.3/static/functions-array.html#ARRAY-FUNCTIONS-TABLE">ARRAY_TO_STRING</a> which leads the path to a very straight forward solution:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> ARRAY_TO_STRING<span style="color: #66cc66;">&#40;</span>ARRAY<span style="color: #66cc66;">&#91;</span>title, firstname, surname<span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">' '</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> persons;
&nbsp;
array_to_string
<span style="color: #808080; font-style: italic;">------------------</span>
Edward Hyde
Dr. Henry Jekyll
<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span> rows<span style="color: #66cc66;">&#41;</span></pre>
<p>Problem solved!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2009/04/01/a-better-concat-for-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filtermasken für Radfahrer</title>
		<link>http://www.laudatio.com/wordpress/2008/12/23/filtermasken-fur-radfahrer/</link>
		<comments>http://www.laudatio.com/wordpress/2008/12/23/filtermasken-fur-radfahrer/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 14:51:46 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Radeln]]></category>
		<category><![CDATA[Radfahren]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/?p=114</guid>
		<description><![CDATA[Interessanter Artikel zum Thema Filtermasken für Radfahrer. Besonders "interessant" sind die Fotos nach Verwendung in unterschiedlichen Städten. Ein Test in Wien würde mich auch schwer interessieren.
]]></description>
			<content:encoded><![CDATA[<p>Interessanter Artikel zum Thema <a href="http://bicycledesign.blogspot.com/2008/12/pollution-mask-for-cyclists.html">Filtermasken für Radfahrer</a>. Besonders "interessant" sind die Fotos nach Verwendung in unterschiedlichen Städten. Ein Test in Wien würde mich auch schwer interessieren.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2008/12/23/filtermasken-fur-radfahrer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note to self about class methods</title>
		<link>http://www.laudatio.com/wordpress/2008/11/05/note-to-self-about-class-methods/</link>
		<comments>http://www.laudatio.com/wordpress/2008/11/05/note-to-self-about-class-methods/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 19:39:49 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Digest::MD5]]></category>
		<category><![CDATA[Digest::SHA1]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/?p=75</guid>
		<description><![CDATA[Don't use them unless you are knowing what you are doing. I recently ran into something strange and was quite busy fixing the problem using much database mojo.
For the calculation of some MD5 sums I was using Digest::MD5. And for some reason I used it this way:
perl -MDigest::MD5 -le 'print Digest::MD5-&#62;md5_hex(&#34;foo&#34;)'
3200a4cda22a4a935412da8113b4139b
Looks good doesn't it? But [...]]]></description>
			<content:encoded><![CDATA[<p>Don't use them unless you are knowing what you are doing. I recently ran into something strange and was quite busy fixing the problem using much database mojo.</p>
<p>For the calculation of some MD5 sums I was using <a href="http://search.cpan.org/dist/Digest-MD5/">Digest::MD5</a>. And for some reason I used it this way:</p>
<pre class="bash"><span style="color: #c20cb9; font-weight: bold;">perl</span> -MDigest::MD5 -le <span style="color: #ff0000;">'print Digest::MD5-&gt;md5_hex(&quot;foo&quot;)'</span>
3200a4cda22a4a935412da8113b4139b</pre>
<p>Looks good doesn't it? But the MD5 digest is incorrect. Just try it yourself and enter 'foo' in any given web MD5 generator out there.</p>
<p>The right way to use Digest::MD5 (and <a href="http://search.cpan.org/~gaas/Digest-SHA1-2.11/SHA1.pm">Digest::SHA1</a> too) would be</p>
<pre class="bash"><span style="color: #c20cb9; font-weight: bold;">perl</span> -M<span style="color: #ff0000;">'Digest::MD5 &quot;md5_hex&quot;'</span> -le <span style="color: #ff0000;">'print md5_hex(&quot;foo&quot;)'</span>
acbd18db4cc2f85cedef654fccc4a4d8</pre>
<p>Okay, my fault. But this annoys me a bit:</p>
<pre class="bash"><span style="color: #c20cb9; font-weight: bold;">perl</span> -<span style="color: #c20cb9; font-weight: bold;">w</span> -MDigest::MD5 -le <span style="color: #ff0000;">'print Digest::MD5-&gt;md5_hex(&quot;foo&quot;)'</span>
&amp;Digest::MD5::md5_hex <span style="color: #000000; font-weight: bold;">function</span> probably called <span style="color: #c20cb9; font-weight: bold;">as</span> class method at -e line <span style="color: #000000;">1</span>.
3200a4cda22a4a935412da8113b4139b
fh$ <span style="color: #c20cb9; font-weight: bold;">perl</span> -Mstrict -Mwarnings -MDigest::MD5 -le \
  <span style="color: #ff0000;">'print Digest::MD5-&gt;md5_hex(&quot;foo&quot;)'</span>
3200a4cda22a4a935412da8113b4139b</pre>
<p>To be honest I have no idea, why <code>-w</code> produces a warning (which is a good thing) and <code>use warning</code> doesn't.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2008/11/05/note-to-self-about-class-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL: TO_ASCII &amp; UTF8</title>
		<link>http://www.laudatio.com/wordpress/2008/11/05/postgresql-83-to_ascii-utf8/</link>
		<comments>http://www.laudatio.com/wordpress/2008/11/05/postgresql-83-to_ascii-utf8/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 19:11:29 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[UTF8]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/?p=62</guid>
		<description><![CDATA[In the process of fixing our code for an upcoming upgrade of one database version for one of our $-projects I encountered a strange behaviour. Initiual situation:

we're moving from PostgreSQL 8.1.3 to the 8.3.5
we're moving from database encoding LATIN1 to UTF8
in our code we're using the TO_ASCII function a few times.

And this combination produces some [...]]]></description>
			<content:encoded><![CDATA[<p>In the process of fixing our code for an upcoming upgrade of one database version for one of our $-projects I encountered a strange behaviour. Initiual situation:</p>
<ul>
<li>we're moving from PostgreSQL 8.1.3 to the 8.3.5</li>
<li>we're moving from database encoding LATIN1 to UTF8</li>
<li>in our code we're using the TO_ASCII function a few times.</li>
</ul>
<p>And this combination produces some headaches.</p>
<p>But first a gentle introduction to the TO_ASCII function. It converts any given text into it's ASCII representation. Folks bound to languages with german umlauts or some kind of apostrophes encounter many problems. For example: what should you do if you have to build some kind of index based on the first character of the lastname. Certainly you don't want to have an extra entry with 'Ü', instead you want to but them into the 'U' list. Grand entrance TO_ASCII:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> to_ascii<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Übermeier'</span><span style="color: #66cc66;">&#41;</span>;
Ubermeie</pre>
<p>Works like a charm. Caveat: TO_ASCII only supports LATIN1, LATIN2, LATIN9 and WIN1250 encodings but no UTF8.</p>
<p>Okay, the first guess would be to do something like this:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> to_ascii<span style="color: #66cc66;">&#40;</span>convert_to<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Übermeier'</span>, <span style="color: #ff0000;">'latin1'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
ERROR:  <span style="color: #993333; font-weight: bold;">FUNCTION</span> to_ascii<span style="color: #66cc66;">&#40;</span>bytea<span style="color: #66cc66;">&#41;</span> does <span style="color: #993333; font-weight: bold;">NOT</span> exist</pre>
<p>Bummer. CONVERT_TO returnes <a href="http://www.postgresql.org/docs/8.3/interactive/datatype-binary.html">BYTEA</a>, TO_ASCII only wants TEXT.</p>
<p>There has been some <a href="http://www.archivum.info/pgsql.hackers/2008-08/msg00346.html">discussion going on</a> on the pgsql.hackers mailinglist and frankly I can follow both parties in their point of view. But thanks to <a href="http://okbob.blogspot.com/">Pavel Stehule</a> we have some kind of a hack to sidestep this issue:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">FUNCTION</span> to_ascii<span style="color: #66cc66;">&#40;</span>bytea, name<span style="color: #66cc66;">&#41;</span>
RETURNS text STRICT <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'to_ascii_encname'</span> <span style="color: #993333; font-weight: bold;">LANGUAGE</span> internal;</pre>
<p>This version gladly accepts the BYTEA data returned by CONVERT_TO so we can just use it in this way:</p>
<pre class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> to_ascii<span style="color: #66cc66;">&#40;</span>convert_to<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Übermeier'</span>, <span style="color: #ff0000;">'latin1'</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">'latin1'</span><span style="color: #66cc66;">&#41;</span>;
Ubermeie</pre>
<p>Problem solved.</p>
<p>Edit: Added fix by eMerzh. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2008/11/05/postgresql-83-to_ascii-utf8/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Therapieversuch</title>
		<link>http://www.laudatio.com/wordpress/2008/03/22/therapieversuch/</link>
		<comments>http://www.laudatio.com/wordpress/2008/03/22/therapieversuch/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 10:20:21 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/2008/03/22/therapieversuch/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.laudatio.com/wordpress/2008/03/22/therapieversuch/"><em>Click here to view the embedded video.</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2008/03/22/therapieversuch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wakka Chikka Wakka Chikka</title>
		<link>http://www.laudatio.com/wordpress/2007/09/20/wakka-chikka-wakka-chikka/</link>
		<comments>http://www.laudatio.com/wordpress/2007/09/20/wakka-chikka-wakka-chikka/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 22:20:40 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Diverses]]></category>
		<category><![CDATA[Musik]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/2007/09/20/wakka-chikka-wakka-chikka/</guid>
		<description><![CDATA[ 2004 schon wurde 'Wakka Chikka Wakka Chikka - Porn Music For The Masses Vol. 1' veroeffentlicht, und das unter der Creative Commons Lizenz. Sprich, man kann es sich direkt mal herunterladen ohne das einem der KGB holen kommt.
Nachdem ich in zwei der 17 Tracks kurz reingehoert habe und es durchaus Gefallpotential hat, linke ich [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="margin-left: 5px; margin-right: 5px;" title="Wakka Chikka Wakka Chikka - Cover" src="http://www.laudatio.com/wordpress/wp-content/uploads/2007/09/cover.jpg" alt="Wakka Chikka Wakka Chikka - Cover" hspace="5" width="128" height="128" align="left" /> 2004 schon wurde '<a href="http://www.comfortstand.com/catalog/049/index.html" target="_blank">Wakka Chikka Wakka Chikka - Porn Music For The Masses Vol. 1</a>' veroeffentlicht, und das unter der Creative Commons Lizenz. Sprich, man kann es sich direkt mal herunterladen ohne das einem der KGB holen kommt.</p>
<p>Nachdem ich in zwei der 17 Tracks kurz reingehoert habe und es durchaus Gefallpotential hat, linke ich das mal hier - vielleicht interessiert es ja einen der 2.5 Leser die ich hab auch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2007/09/20/wakka-chikka-wakka-chikka/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Critical Mass 500+</title>
		<link>http://www.laudatio.com/wordpress/2007/09/17/critical-mass-500/</link>
		<comments>http://www.laudatio.com/wordpress/2007/09/17/critical-mass-500/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 21:41:51 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Diverses]]></category>
		<category><![CDATA[Radeln]]></category>
		<category><![CDATA[Radfahren]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/2007/09/17/critical-mass-500/</guid>
		<description><![CDATA[Ich trau mich ja fast nichts mehr schreiben nach so langer Zeit, aber nachdem man vielleicht doch den einen oder anderen Hit weiterleiten kann... am Freitag ist es wohl so weit und ich schwinge mal meinen Hintern zum Wiener Critical Mass nachdem ich da schon mindestens drei Mal behauptet hab ich tus und dann doch [...]]]></description>
			<content:encoded><![CDATA[<p>Ich trau mich ja fast nichts mehr schreiben nach so langer Zeit, aber nachdem man vielleicht doch den einen oder anderen Hit weiterleiten kann... am Freitag ist es wohl so weit und ich schwinge mal meinen Hintern zum <a href="http://www.criticalmass.at/56">Wiener Critical Mass</a> nachdem ich da schon mindestens drei Mal behauptet hab ich tus und dann doch der Schweinehund nicht zu ueberwinden war. Kollege <a href="http://offler.hoppa.la/~hekker/bagetuch/index.php?/archives/195-500+-critical-mass.html">Hekker</a> hat auch gesagt er kommt und sogar <a href="http://tomasio.laudatio.com/">Thomas</a> will seinen Art Director Palast verlassen und mitrollen. Gibt sicher keine bessere Variante <a href="http://de.wikipedia.org/wiki/Jom_Kippur">Yom Kippur</a> einzuleuten als bei sowas mitzufahren (wenn das Wetter passt zu meiner Schande).</p>
<p>Was gibt es sonst neues? Dem Haxen geht es soweit gut, im Captain Ahab Mode bin ich trotzdem noch. Radfahren geht damit auch noch immer gut, den letzten Schmerz hatte ich wie ich Fussballtricks ala Yair ausprobiert habe - so Drehungen sind nach wie vor Aua.</p>
<p>Gleich nach dem Urlaub gabs eine Upgrade @ $ bei dem ich anwesend sein musste - bis halb zwei Morgens ging es - und das obwohl mir schon den ganzen Tag nach Niederlegen war. Was ich dann auch den Rest der Woche getan hab. Inkl. Schwindel, Kopfweh und dem grossen Ganzkoerperschmerz. Jetzt huste ich noch wie ein Kettenraucher und produziere Dinge in meiner Nase die lieber unausgesprochen bleiben. Jedenfalls hatte die Woche ein Gutes, ich hab mich schon wieder auf die Arbeit gefreut nach ein paar (bedingt durch noch mehr Feiertage unter der Woche) Tagen Einkasernierung.</p>
<p>Na ja - soweit so gut, jetzt gilt es halt nur den Archos samt Helmcam wieder auf Trab zu bringen und am Freitag nicht doch wieder umzukippen und sitzen zu bleiben... und Videoschnittsoftware auf'm Mac hab ich auch noch nicht &lt;/note to self&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2007/09/17/critical-mass-500/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non fratture&#8230;</title>
		<link>http://www.laudatio.com/wordpress/2007/08/07/non-fratture/</link>
		<comments>http://www.laudatio.com/wordpress/2007/08/07/non-fratture/#comments</comments>
		<pubDate>Tue, 07 Aug 2007 18:45:33 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Diverses]]></category>
		<category><![CDATA[Autsch]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/2007/08/07/non-fratture/</guid>
		<description><![CDATA[...heisst soviel wie nichts ist gebrochen.
Telegram vom Strand: Hr. Helmberger bewegt seinen Adoniskoerper mit ungewohnter Geschwindigkeit aus dem Wasser um einer spaerlich bekleideten Amazone nachzuspringen. Nach 10 Metern machts *schnapp* und besagter Koerper liegt im Dreck, Hr. Helmberger denkt sich Aua, bekleidet von heiserem, hysterischen Gelaechter (/slap). Erst nach einem unglaeubigen Blick auf das Melonengrosse [...]]]></description>
			<content:encoded><![CDATA[<p>...heisst soviel wie nichts ist gebrochen.</p>
<p>Telegram vom Strand: Hr. Helmberger bewegt seinen Adoniskoerper mit ungewohnter Geschwindigkeit aus dem Wasser um einer spaerlich bekleideten Amazone nachzuspringen. Nach 10 Metern machts *schnapp* und besagter Koerper liegt im Dreck, Hr. Helmberger denkt sich Aua, bekleidet von heiserem, hysterischen Gelaechter (/slap). Erst nach einem unglaeubigen Blick auf das Melonengrosse (erm, nicht ganz, aber doch) Sprunggelenk am linken Lauf und irgend einem random insult gabs dann endlich die notwendige Zuwendung. Und erst nachdem's Hrn. Helmberger gar nicht mehr wohl in der Haut war (inkl. gezittere und (angeblich) schneeweissem Gesicht) wurde dann die Notfallkette in Gang gesetzt.</p>
<p>Erst kamen 2 Strandsheriffs die nicht viel taten ausser weiterzuleiten und zu schauen.</p>
<p>Dann kam eine Krankenschwester in Weiss mit Stethoskop um den Hals auf einem Fahrrad an und schaute schon ein bissl mehr.</p>
<p>Dann wurde ziemlich lang auf den RTW gewartet, der dann in Form einer typischen Ehrenamtlichen Mannschaft auftauchte. Naemlich ein Schrank von einem Fahrer und einem 50 kg Sanitoesenfrauchen. Beide nur mit ein wenig English bewappnet - aber war auch nicht notwendig, war ja im Prinzip klar was passiert war.</p>
<p>Ein recht erniedrigender Abtransport vom Strand via Tragesessel: erst schleifen, dann nach einer Verschnaufpause zu dritt (3!!!) getragen und dann doch zum Auto geschoben. Dort hab ich's der RTW Mannschaft doch nicht abgerungen die ewige Frage zu beantworten wie eine "Schrank/Frauchen" Mannschaft jemanden transportiert, geschweige denn bergen kann und bin selbst reingehupft. Waerend dem Transport das kleine Programm: erste Aktion: Pulsoxy drauf, zweite Aktion: Blutdruck messen, wobei es hier nicht so ganz hingehauen hat. Transportschein hab ich dann zum grossen Teil selbst ausgefuellt - was eh besser war da mehrsprachig bedruckt.</p>
<p>Naechste Station: Erste Hilfe Station im Ort. Nach kurzem Warten (davor war jemand in Behandlung der gar nicht gut aussah (Stifneck, total fixiert)) eine noch kuerzere Kontrolle, Verband drauf und weiter geschickt ins naechste Krankenhaus mit Roetgenabteilung und gleich noch einem Schein fuer die Orthopaedie.</p>
<p>Dort mit dem Privatfahrzeug hin, kurz mal in der Erstversorgung gewartet, weiter in die Roentgenabteilung, dort Null Wartezeit vor dem Roentgen, dann kurze Wartezeit zum Abwarten des Befundes. Ach ja, humorig aber durchaus praktisch war eine Aktion von dem Gehilfen dort, der mir von einer Hilfskarte vorlas, das ich jetzt draussen auf den Arztbefund warten soll. Auf dem stand dann halt 'Non fratture' - also wohl nichts gebrochen.<br />
Juhu, keine Notoperation in Italien mit anschliessendem Verkauf meiner inneren Organe am Schwarzmarkt.</p>
<p>In der Orthopaedie dann nach kurzer Wartezeit ein absolute Proteam von Arzt und Helfer, denen's auch vollkommen wayne war, das zwei Kinder auf mir herumgeturnt sind waerend ein Zinkverband angelegt wurde.</p>
<p>Danach noch die uebliche Belehrung: paar Tage Ruhe, einige Sachen einwerfen, blah blah blah und anschliessende Flucht.</p>
<p>Auf dem Parkplatz noch gehoerterweise irgendwelche Mafiosischwarze (liegts vielleicht daran, dass das Krankenhaus 'Veneto Orientale' heisst?) die Kindern ein Paar Sportsocken in die Hand druecken und dann 15 Euro dafuer erpressen wollen, erm. ja.</p>
<p>Egal - been there done that. Brauch ich nicht noch einmal, kanns aber zur Not weiterempfehlen.</p>
<p>Bilder gibts leider keine, dafuer fehlte die Geistesgegenwart und Gefuehlskaelte. Allerdings werden die Roentgenaufnahmen nachgeliefert.</p>
<p>Ach ja, hoffe damit ist die Radsaison nicht beendet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2007/08/07/non-fratture/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wasserschaden</title>
		<link>http://www.laudatio.com/wordpress/2007/06/17/wasserschaden/</link>
		<comments>http://www.laudatio.com/wordpress/2007/06/17/wasserschaden/#comments</comments>
		<pubDate>Sun, 17 Jun 2007 13:05:05 +0000</pubDate>
		<dc:creator>fh</dc:creator>
				<category><![CDATA[Diverses]]></category>
		<category><![CDATA[Wohnung]]></category>

		<guid isPermaLink="false">http://www.laudatio.com/wordpress/2007/06/17/wasserschaden/</guid>
		<description><![CDATA[Wassereinbruch nach dem grossen Regen in Wien vorigen Sonntag - sehr super, me not amused.

]]></description>
			<content:encoded><![CDATA[<p>Wassereinbruch nach dem grossen Regen in Wien vorigen Sonntag - sehr super, me not amused.</p>
<p><iframe src="http://www.flickr.com/slideShow/index.gne?user_id=34076317@N00&amp;set_id=72157600380166415" align="middle" frameborder="0" height="450" scrolling="no" width="450"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.laudatio.com/wordpress/2007/06/17/wasserschaden/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
