The last version looked OK, so I'm marking this patch as ready for committer in the commitfest app.
-- Alexander KuzmenkovPostgres Professional: http://www.postgrespro.comThe Russian Postgres Company