This topic was automatically generated from Slack. You can find the original thread here.
Is it possible to execute multiple queries in a single Postgres step?
I have tried connection pooling (nodejs code), combinedqueries, awaiting one to complete, etc. but I can’t seem to get it to work
I am needing to do this to first perform an increase of the statement_timeout, and then in the same session / connection run a separate query (which takes a few minutes to retrieve)
• If I ran this in two different steps, the statement timeout extension is only applied to the first step on Pipedream
Therefore trying to do this in one step to run multiple queries in one connection
You might want to call const client = await this.postgresql._getClient(); yourself, and then run your two queries on the same client/connection (using await client.query(query);).