Hi
The documentation (or this feature) is broken still
If dbname is NULL or dboid is InvalidOid, the session is not connected to
any particular database, but shared catalogs can be accessed. If username
is NULL or useroid is InvalidOid, the process will run as the superuser
created during initdb. A background worker can only call one of these two
functions, and only once. It is not possible to switch databases.
But it fails with error:
FATAL: database 0 does not exist
I found some older thread related to this topic
http://www.postgresql.org/message-id/13994.1376145608@sss.pgh.pa.us
Regards
Pavel