Hi all,

I am new to this forum, and I hope somebody could shed light on
this weird problem I have with the COPY command.
I am copying tables to external files and for some tables the command generates an empty file, although the table is not empty. There is no error message either. The server just echoes COPY.
I tried \copy and it didn't make a difference.

There doesn't seem to be anything special about the tables on which COPY fails.
They have the same permissions as other tables (which I copied successfully), and they are not very large

I tried multiple variations from the psql prompt (listing the column names or not, including OIDs or not) - doesn't help.

I can save the problem tables using:
psql -qc 'select * from table' dbname > filename

But I don't understand why COPY fails. I am in the process of backing up and upgrading postgres using pg_dump, and because of this weird behaviour, pg_dump doesn't generate the whole DB.

Thanks!
-Jona