You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redshift does not support startup parameter LC_MONETARY #163
It seems that Amazon redshift does not support some of the functionality expected by postgres connections. When connecting to an SSL enabled cluster with the 2.1.0.beta1 driver the following error occurs:
permission denied to set parameter "lc_monetary" to "C"
I would like to request a feature whereby a connection string option can be set to specify that the connection is to redshift and subsequently decisions can be made in the code to avoid certain nuances with the implementation of the postgres-like schema.
We need better handling of those cases.
Until now, the only reported problem was about the lc_monetary. Maybe we need to find another way to handle monetary values instead of relying on changing runtime configuration value.
I agree. An inability to set a parameter should not stop the connection.
But also this is an expected parameter in postgres so it is entirely
reasonable to expect it to be there.
I do appreciate that Redshift is an edge case and could potentially become
a branch to the driver rather than being accommodated in a over size fits
all driver.
On 12 Feb 2014 20:54, "Francisco Figueiredo Jr." [email protected]
wrote:
We need better handling of those cases.
Until now, the only reported problem was about the lc_monetary. Maybe we
need to find another way to handle monetary values instead of relying on
changing runtime configuration value.
Reply to this email directly or view it on GitHubhttps://github.com//issues/163#issuecomment-34916622
.
Thanks @khalidsalomao for the tip. I am looking forward to have this bug fixed. Regardless, @franciscojunior great job with the lib, I'm starting to use, but I can already consider myself a big fan.
This issue comes back again when you use pgbouncer ( which cannot support startup parameters for various reasons ). If I may weigh in on the matter, I don't think the driver should be setting parameters - please let the users do that :)
@ReinsBrain this issue is 5 years old, which means I've been maintaining Npgsql for too long :)
More importantly though, Npgsql hasn't been sending LC_MONETARY for several years now - which exact parameter incompatibility are you seeing with pgbouncer? For reference, here's the code which sends the parameters on startup.
Activity
franciscojunior commentedon Feb 12, 2014
When this error occurs, are you able to continue connecting and use the server ?
franciscojunior commentedon Feb 12, 2014
We need better handling of those cases.
Until now, the only reported problem was about the lc_monetary. Maybe we need to find another way to handle monetary values instead of relying on changing runtime configuration value.
Stackoverflow also has a question about that: http://stackoverflow.com/questions/20969365/permission-denied-to-set-parameter-lc-monetary-to-c
griffoff commentedon Feb 12, 2014
No. The error stops the connection as it throws an error within the open method.
griffoff commentedon Feb 12, 2014
I agree. An inability to set a parameter should not stop the connection.
But also this is an expected parameter in postgres so it is entirely
reasonable to expect it to be there.
I do appreciate that Redshift is an edge case and could potentially become
a branch to the driver rather than being accommodated in a over size fits
all driver.
On 12 Feb 2014 20:54, "Francisco Figueiredo Jr." [email protected]
wrote:
mateusaubin commentedon Feb 17, 2014
I wrote some custom code to avoid two issues with Redshift. You can see it on my fork.
I could create a pull request if you guys find it usefull.
The issues I've found were:
khalidsalomao commentedon Apr 10, 2014
This issue was introduced in the versions +2.1.
Last version that worked fine is 2.0.14.3.
Heucles commentedon Aug 29, 2014
Thanks @khalidsalomao for the tip. I am looking forward to have this bug fixed. Regardless, @franciscojunior great job with the lib, I'm starting to use, but I can already consider myself a big fan.
62 remaining items
franciscojunior commentedon Feb 18, 2015
Yes. There is only a missing line in #489 . I'm committing it now....
franciscojunior commentedon Feb 18, 2015
Done! Now #489 is 100%.
franciscojunior commentedon Feb 18, 2015
All set!
@mateusaubin , @khalidsalomao you can download latest 2.2 binaries with latest amazon redshift support here: https://build.npgsql.org/viewLog.html?buildId=14051&tab=artifacts&buildTypeId=npgsql_All22
Please, give it a try and let us know if you find any issues. Thanks in advance.
khalidsalomao commentedon Feb 19, 2015
Hi @franciscojunior, @roji ,
It worked! 😄
Tested several operations and all is fine!
Thanks guys!
roji commentedon Feb 19, 2015
Great. @franciscojunior, go ahead and merge #489 into 2.2. Then we can see if there's anything else we want to do for 2.2.5.
franciscojunior commentedon Feb 19, 2015
Done!
ReinsBrain commentedon Nov 16, 2020
This issue comes back again when you use pgbouncer ( which cannot support startup parameters for various reasons ). If I may weigh in on the matter, I don't think the driver should be setting parameters - please let the users do that :)
roji commentedon Nov 16, 2020
@ReinsBrain this issue is 5 years old, which means I've been maintaining Npgsql for too long :)
More importantly though, Npgsql hasn't been sending LC_MONETARY for several years now - which exact parameter incompatibility are you seeing with pgbouncer? For reference, here's the code which sends the parameters on startup.