I'm using the following dblink query to connect to another database on the server. Query itself works fine, however I have the problem that if the password contains a space character like in "hello world", then dblink can't connect to that database.

Is there any possibility to get that working with dblink? I have to dynamically create this view, so I have no choice if a user uses a password like that. I suppose the same problem occurs when the user name contains a space character.


CREATE VIEW MyView AS
SELECT * from dblink('host=TestHost port=5432 dbname=TestDB user=postgres password=hello world','SELECT "Name" FROM "TestTable"') AS (Name text);

Thank you,
H.Muster

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to