From: | "Egashira, Yusuke" <egashira(dot)yusuke(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | 'Giuseppe Sacco' <giuseppe(at)eppesuigoccas(dot)homedns(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: Question about password character in ECPG's connection string |
Date: | 2019-08-28 01:18:48 |
Message-ID: | 848B1649C8A6274AA527C4472CA11EDD5FC76A28@G01JPEXMBYT02 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi, Giuseppe,
Thanks to response to my question!
> It seems to me that ECPG documentation does not allow specifying
> username and/or password in the connection string. The correct syntax
> should be:
>
> EXEC SQL CONNECT TO "unix:postgresql://localhost/connectdb" USER
> "myuser" IDENTIFIED BY "pass&word"
Yes, I could connect to database with "USER" and "IDENTIFIED BY" phrase in CONNECT statement.
However, I could also connect to database with password in connection string when my password does not contains '&' character.
1. In database,
> CREATE ROLE myuser LOGIN PASSWORD 'password';
2. In ECPG application,
EXEC SQL CONNECT "tcp:postgresql://localhost?user=myuser&password=password";
-> The connection was succeeded.
This behavior confuse me.
If user and password cannot write in connection string, what are parameters allowed in "connection_option" ?
I hope I can get this information from the ECPG documentation.
Regards.
--
Yusuke, Egashira.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2019-08-28 03:22:25 | Re: Work hours? |
Previous Message | raf | 2019-08-27 23:42:04 | Re: Work hours? |