Password with Special Character #90
-
I'm trying to do an initial schema build. We have an environmental wide special character requirement, and I'm receiving the error ["can't read xyz": no such variable]. I've tried putting a backslash on the front of the password to no avail. Any help is appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
By default the special characters are intepreted so you need to wrap them with curly braces. So taking an example (tested with Oracle) giving a password of |
Beta Was this translation helpful? Give feedback.
-
Simply putting the password (containing a $ sign) in curly braces doesn't help with postgres. |
Beta Was this translation helpful? Give feedback.
-
Frank,
I could never get it to work. I ended up creating an account with its own
password policy to not require special characters to begin benchmarking.
Regards,
Jeff McGettigan
…On Tue, Jul 28, 2020 at 11:41 AM Frank Brendel ***@***.***> wrote:
Simply putting the password (containing a $ sign) in curly braces doesn't
help with postgres.
I still get a password authentication error for the schema build.
Any other hints to get this working?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/TPC-Council/HammerDB/issues/90#issuecomment-665115258>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI2BETGTB4AOS2FKWT5Z4OLR53WQXANCNFSM4KGUOI3A>
.
|
Beta Was this translation helpful? Give feedback.
-
Hi Jeff, and how did you built the schema then? Cheers! |
Beta Was this translation helpful? Give feedback.
-
Hi, There are a couple of ways to prevent the $ being evaluated as a variable. Firstly as you say with the curly braces and secondly with the subst command with the novariables argument. it depends on what password and where it is being evaluated on whether this passes all the way through the stack.
In v4.0 a new feature for PostgreSQL has been added where the database can be created first and then this will be used instead of needing to create one that needs the superuser permissions. Steve |
Beta Was this translation helpful? Give feedback.
-
Hi Steve, I'm not a Tcl expert. I simply wanted to use a more or less secure password. The good news is that I got it to work. Regards, |
Beta Was this translation helpful? Give feedback.
-
I've changed the pg_connect stuff in the files pgotc.tcl, pgoltp.tcl and pgolap.tcl from the src/postgresql directory. |
Beta Was this translation helpful? Give feedback.
-
That's great and the real benefit of being open source so you can change exactly what you need to |
Beta Was this translation helpful? Give feedback.
Hi Steve,
I'm not a Tcl expert. I simply wanted to use a more or less secure password.
The good news is that I got it to work.
I simply changed the connection string in the lines 1313 and 1320 from a list to an URI.
pg_connect -conninfo "postgresql://$user:$password@$host:$port/$dbname"
Then I used the URL encoded $ sign (%24) in the password (e.g. change pass$word to pass%24word).
Regards,
Frank