psqlpy-python / psqlpy

Asynchronous Python PostgreSQL driver written in Rust
https://psqlpy-python.github.io/
MIT License
230 stars 5 forks source link

How to use SET statements? #106

Open kesavkolla opened 1 week ago

kesavkolla commented 1 week ago

Postgres allow to add SET statements to set some parameters.

Eg: SET datestyle TO postgres, dmy; SET TIME ZONE 'America/Los_Angeles';

How can use these SET statements as part of executing query?

Eg: I would like to run this

SET TIME ZON 'America/Los_Angeles'; SELECT NOW()

Execute batch is not returning results so can't use executeBatch method. Is there any way to achieve this?

chandr-andr commented 1 week ago

@kesavkolla Maybe do it in different queries?