I'm trying to upload a pg_dump file from a postgres 9.6 database that I just built locally on my Windows machine up into Google Cloud SQL. I have followed the directions on this page as best I can on my Windows machine (I mannually commented out the "EXTENSION" statements in the dump file). I then uploaded the pg_dump file to a Google Cloud Bucket, and finally tried to import the pg_dump'ed file into Google Cloud SQL. I keep getting the following error:
Import failed: ERROR: invalid byte sequence for encoding "UTF8": 0xff Import error: exit status 3
I've looked around and on Stack Overflow and some similar posts suggested putting in a additional arguments to specify the encoding. I've tried the following 3 pg_dump commands and none of them seem to be compatible with Google Cloud's import process. Any ideas?
pg_dump -U [USER_NAME] --format=plain --no-owner --no-acl [DB_NAME] > dbexport.sql
pg_dump --encoding=ISO88591 -U [USER_NAME] --format=plain --no-owner --no-acl [DB_NAME] > dbexport.sql
pg_dump --encoding=UTF8 -U [USER_NAME] --format=plain --no-owner --no-acl [DB_NAME] > dbexport.sql
I also did a search in the .sql file using Notepad++ for "\x{0xff}" per this post and several upper/lower case variants and couldn't find that character in the file anywhere.