cannot dump structures - Mailing list pgsql-general

From Martin Korous
Subject cannot dump structures
Date
Msg-id 1831.2638-2036-1082343711-1197038521@seznam.cz
Whole thread Raw
Responses Re: cannot dump structures
List pgsql-general
Hello,

I have on db server Postgresql 8.2.5
pg_dump (data and structures) works well.

I have copied pg_dum file  (and libpq.so.5) to other server, into chroot where is apache and phppgadmin. And there is
problem.Dump of structures doesnt work, onlydata OK. 

I have wrote 2 minimalistic php scripts:

1] dump only data works:
<?
putenv('PGPASSWORD=password');
$cmd = '/var/pgsql/bin/pg_dump dbname -U dbuser -h hostname -a -i';
passthru($cmd);
?>

2] dump structures doesnt work
<?
putenv('PGPASSWORD=password');
$cmd = '/var/pgsql/bin/pg_dump dbname -U username -h hostname -s -i';
passthru($cmd);
?>
and in pg_log is message:
STATEMENT:  SELECT (SELECT usename FROM pg_user WHERE usesysid = datdba) as dba, pg_encoding_to_char(encoding) as
encoding,datpath FROM pg_database WHERE datname = 'dbname' 
ERROR:  column "datpath" does not exist at character 113

I have search on google, mailing lists, forums...
I know that this message means that pg_dump is old version, but its impossible, the pg_dump binary file is from
dbserver.

DATABASE:
#/var/pgsql/bin/pg_dump --version
pg_dump (PostgreSQL) 8.2.5

WEBSERVER in CHROOT:
#chroot /usr/local/chroot/apache_phpPgAdmin /var/pgsql/bin/pg_dump --version
pg_dump (PostgreSQL) 8.2.5

linked with right library:
#chroot /usr/local/chroot/apache_phpPgAdmin /usr/local/ldd /var/pgsql/bin/pg_dump
        libpq.so.5 => /var/pgsql/lib/libpq.so.5 (0xb7f3c000)

pg_dump on dbserver works.
same binary file on other server doesnt work.
How is it possible please?

Btw. old pg_dump for old postgresql(7.4.7) works well.

pgsql-general by date:

Previous
From: Ted Byers
Date:
Subject: Re: SQL design pattern for a delta trigger?
Next
From: "Josh Harrison"
Date:
Subject: Replication using WAL files