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
Question: how to properly set datestyle on pooled connections #1393
When using the pool.connect & client.release approach, I'm setting the set datestyle = iso mdy as a first query to have my date-types parsed properly.
However, how to do it with the pool.query call? Since the connection returned is random - and might be an existing one recently returned to the pool as well as a newly established one..
Im not sure, if setting pg.types.setTypeParser for all the date/datetime/timestamp with/without timezone is a way I want to go..
Activity
charmander commentedon Aug 1, 2017
You can create a client type for use with the pool providing custom startup configuration:
It might be nice to have an option along these lines, though:
bydga commentedon Aug 1, 2017
hm, i've solved it by doing
but your solution looks better :)
brianc commentedon Aug 7, 2017
I added this to the documentation