| From: | Hermann Muster <Hermann(dot)Muster(at)gmx(dot)de> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | dblink can't query a password with a space |
| Date: | 2008-12-02 10:37:45 |
| Message-ID: | gh335n$158h$1@news.hub.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Grzegorz Jaśkiewicz | 2008-12-02 10:40:02 | Re: Favorite Tom Lane quotes |
| Previous Message | Andreas Kraftl | 2008-12-02 10:37:05 | Time without seconds |