I played around with this, and I was able to set up an external table for a table in my Postgres database in Azure.
You have a DSN in your definition of the external data source, but I don't see the definition of the DSN but I think the problem is that you have not specified the database, and in that case the driver appears to take the username as the database name.
Here is how I set up my external data source:
CREATE EXTERNAL DATA SOURCE postsommar
WITH ( LOCATION = 'odbc://postsommar.database.windows.net',
CONNECTION_OPTIONS = 'Driver={PostgreSQL Unicode(x64)};Database=postgres',
PUSHDOWN = ON,
CREDENTIAL = postgres_user);
And here is the external table:
CREATE EXTERNAL TABLE mypostgrestest (
id_number int NOT NULL,
name_t nvarchar(50) NOT NULL
) WITH (LOCATION = 'mytest',
DATA_SOURCE=postsommar)
Initially, I did not have the Database part in the connection options, and this was confusing, because when I specified LOCATION as postsommar.mytable that was successful, but when running a SELECT against the table that failed with the same error as you got.
That is certainly illogical, but the entire location postgres.postsommar is illogical - it should be postgres.public.postsommar. However, that produced the error "The specified LOCATION string 'postgres.public.mytest' could not be parsed."