0

I am trying to import a pg_dump from a Linux machine called "dump.sql" into a windows machine that has PgAdmin4 that does not have psql working.

I keep getting this error message:

pg_restore: [archiver] input file appears to be a text format dump. Please use psql.

Any help is greatly appreciated.

toti08
  • 2,448
  • 5
  • 24
  • 36
S. Shao
  • 61
  • 5
  • 1
    If the file isn't too big, simply load it into the query tool, then run it. But I don't think that pgAdmin supports the `COPY FROM stdin` that is used in a `pg_dump` plain text file. –  Nov 07 '18 at 09:37

1 Answers1

0

You cannot do that.

One problem is the COPY FROM STDIN that you can find in an SQL dump, and the other is the \c command you will find in dumps created with -C.

Not sure if there are more problems, but these are definitely showstoppers.

Did you delete the psql executable?
I have not seen a Windows pgAdmin installation without a psql.exe so far.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Thank you, you are correct. So installed pgAdmin again and psql.exe was there, and it worked. Thanks! – S. Shao Nov 13 '18 at 09:28
  • 1
    For others who happen across this: If you do `pg_dump` with flag `--insert` it will output in a format that can be run as a standard SQL query. – PeterM Sep 11 '19 at 19:32