I am experiencing a problem with dumping one specific database on
a cluster. All 143 other databases dump without giving errors.
The server runs PostgreSQL 7.3.2 on OpenBSD (I know :). pg_dump
is version 8.0.3 on Windows (upgraded from 8.0.1 which had the
same problem). The error message is:
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: Cannot cast type
"unknown" to text
pg_dump: The command was: SELECT proretset, prosrc, probin,
null::text as proargnames, provolatile, proisstrict, prosecdef,
(SELECT lanname FROM pg_catalog.pg_language WHERE oid = prolang)
as lanname FROM pg_catalog.pg_proc WHERE oid =
'8331054'::pg_catalog.oid
Below I have copy pasted the console log which has some
additional information. This bug, or a related one, seems to have
been registered previously as bug #1455
http://archives.postgresql.org/pgsql-bugs/2005-02/msg00021.php
Jochem
C:\Program Files\PostgreSQL\8.0\bin>psql --version
psql (PostgreSQL) 8.0.3
C:\Program Files\PostgreSQL\8.0\bin>pg_dump wedstrijdzeilen >
"z:\backup\databases\2005-06-06\wedstrijdzeilen.sql"
Password:
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: Cannot cast type "unknown" to text
pg_dump: The command was: SELECT proretset, prosrc, probin, null::text as
proargnames, provolatile, proisstrict, prosecd
ef, (SELECT lanname FROM pg_catalog.pg_language WHERE oid = prolang) as lanname
FROM pg_catalog.pg_proc WHERE oid = '833
1054'::pg_catalog.oid
C:\Program Files\PostgreSQL\8.0\bin>psql wedstrijdzeilen
Password:
Welcome to psql 8.0.3, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
Warning: Console code page (437) differs from Windows code page (1252)
8-bit characters may not work correctly. See psql reference
page "Notes for Windows users" for details.
oli=> select version();
version
---------------------------------------------------------------------
PostgreSQL 7.3.2 on i386-unknown-openbsd3.2, compiled by GCC 2.95.3
(1 row)
wedstrijdzeilen=> SELECT proretset, prosrc, probin, null::text as proargnames,
provolatile, proisstrict, prosecdef, (SEL
ECT lanname FROM pg_catalog.pg_language WHERE oid = prolang) as lanname FROM
pg_catalog.pg_proc WHERE oid = '8331054'::p
g_catalog.oid;
proretset |
prosrc
| probin
| proargnames | provolatile | proisstrict
| prosecdef | lanname
-----------+------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------+--------+-------------+-------------+------------
-+-----------+---------
t |
SELECT j.parent_id as id,
(SELECT singular FROM dswz.translations WHERE id = t.name AND
language_id = (SELECT dswz.check_creator_i
d ($1, $2, $3, $4))),
street,
house_number,
zipcode,
city,
(SELECT singular FROM dswz.translations WHERE id = nations.name
AND language_id = (SELECT dswz.check_cre
ator_id ($1, $2, $3, $4)))
FROM dswz.view_addresses a LEFT JOIN dswz.nations ON country =
nations.id,
dswz.joins($1, $2,$3,$4) j,
dswz.object_types t
WHERE j.child_id = a.id
AND t.id = a.type
AND j.cancel_time > now();
| - | | v | f | t | sql
(1 row)
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster