Re: Question about password character in ECPG's connection string

2019-08-31 Thread Tom Lane
Luca Ferrari writes: > On Thu, Aug 29, 2019 at 1:08 PM Egashira, Yusuke > wrote: >> According to my tests, I think that the ECPG's connection_option seems not >> to accept '&' character as password anyhow... >> ECPG CONNECT's connection_option seems to have some restricted characters. > As far

Re: Question about password character in ECPG's connection string

2019-08-29 Thread Luca Ferrari
On Thu, Aug 29, 2019 at 1:08 PM Egashira, Yusuke wrote: > According to my tests, I think that the ECPG's connection_option seems not to > accept '&' character as password anyhow... > ECPG CONNECT's connection_option seems to have some restricted characters. As far as I understand from

RE: Question about password character in ECPG's connection string

2019-08-29 Thread Egashira, Yusuke
> > Perhaps it helps to URL-encode the & in the password as %26? > > The OP already did without success. Yes, I already get failed with URL-encode the &. > Could it be needed to escape the & with the backslash or single ticks? Thanks. I tested with "pass\&word" and "'pass&word'". However, them

Re: Question about password character in ECPG's connection string

2019-08-28 Thread Luca Ferrari
On Wed, Aug 28, 2019 at 10:47 PM Alban Hertroys wrote: > Perhaps it helps to URL-encode the & in the password as %26? The OP already did without success. Could it be needed to escape the & with the backslash or single ticks? Luca

Re: Question about password character in ECPG's connection string

2019-08-28 Thread Alban Hertroys
> 2) "tcp:postgresql://localhost?user=myuser&password=password" looks like > > "tcp:postgresql://localhost?user=myuser&password=my&pwd" > > and password is parsed on the & and you also end up with an extra parameter > pwd Perhaps it helps to URL-encode the & in the password as %26? Alban He

Re: Question about password character in ECPG's connection string

2019-08-28 Thread Adrian Klaver
On 8/27/19 6:18 PM, Egashira, Yusuke wrote: 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/conne

RE: Question about password character in ECPG's connection string

2019-08-27 Thread Egashira, Yusuke
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 "

Re: Question about password character in ECPG's connection string

2019-08-27 Thread Giuseppe Sacco
Hello Yusuke, Il giorno mar, 27/08/2019 alle 07.29 +, Egashira, Yusuke ha scritto: [...] > I referred the below documents. > - CONNECT of ecpg: > https://www.postgresql.org/docs/9.5/ecpg-sql-connect.html > - Connection string of libpq: > https://www.postgresql.org/docs/9.5/libpq-connect.html

Question about password character in ECPG's connection string

2019-08-27 Thread Egashira, Yusuke
Hi, I have question about connection string of ECPG's CONNECT statement. I'm using postgresql 9.5.17 with ECPG application. When I trying to connect to the database, I found that some characters as password in ECPG's connection_option cannot be accepted. Is the specification of ECPG's connection