Skip to content

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.

3 participants