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

Improve multistatement support for postgres #1018

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nobbynobbs
Copy link

Hi!

I opened this PR because:

multistmt is naive and simply splits by ; so it's incorrectly separating the body of your function

Before open in it, I've found related issue and the couple of staled PR's:

In this PR I suggest to complicate Postgres multi-statement parser, but do not implement all the lexer/parser machinery, preserve the same approach that already used, but make it be respectful to dollar quoted string literals.

Also, I've tried another approach, like use third-party library to parse migration and split it to statements. Sounds good, implementation looks pretty, but doesn't work at all, see nobbynobbs#1

@coveralls
Copy link

Coverage Status

coverage: 59.56% (+0.4%) from 59.21%
when pulling d849290 on nobbynobbs:improve-postgres-multistatement
into 0815e2d on golang-migrate:master.

@bnkamalesh
Copy link

just hoping/looking forward to getting this merged asap!

@bnkamalesh
Copy link

bnkamalesh commented Apr 15, 2024

hello @dhui would this PR be considered?

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.

None yet

3 participants