Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PG]: Fix set transaction empty config error in pg-core #3580

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jastor11
Copy link

When an empty config object is supplied for postgres transactions, the client issues the query 'set transaction ;' which causes a postgres parsing error for the pglite and postgres-js drivers. This commit uses the same approach seen in drizzle-orm's mysql-core here and here to only execute the set transaction sql when a non-empty config object is supplied to the transaction.

Addresses bug identified in this issue.

When an empty config object is supplied for postgres transactions, the client issues the query `set transaction ;` which causes a postgres parsing error for the pglite and postgres-js drivers. This commit uses the same approach seen in drizzle-orms mysql driver to only execute the `set transaction` sql when a non-empty config object is supplied to the transaction.
Remedy indentation formatting to match codebase conventions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant