I’m trying to set a connection variable (`statemen...
# adobe
l
I’m trying to set a connection variable (
statement_timeout
) in the connection string for my PostgreSQL database. I’ve added
statement_timeout=30m
in the Connection String box in the datasource definition, but if I run the query
SHOW statement_timeout
, it shows me a zero. Does anyone have experience with setting variables in PostgreSQL connection strings?
j
Did you prefix it with the
-c
?
Copy code
"jdbc:<postgresql://localhost:5432/postgres?options=-c%20search_path=test,public,pg_catalog%20-c%20statement_timeout=90000>";
l
Jon, I had not. That worked! Thanks!
Also, what a strange way to format things!
j
I agree! That driver was implemented in a weird way a long time ago. I haven’t done a lot of work with PostgreSQL for a number of years, but I remember being tripped up by things like that.
l
PostgreSQL is generally amazing, and their docs are top-notch. I just didn’t RTFM. Thanks again!
🙂 1