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

Fixed a terrible diff issue case of PostgreSQL #91

Closed
wants to merge 5 commits into from

Conversation

Code-Hex
Copy link

Why terrible?

  • It outputs syntax that will result in an error when executed.
    ALTER TABLE tablename ALTER colname TYPE serial;
  • When parsing from DBI, unexpected types are returned
  • Similarly, unexpected sizes are returned
  • There is no type match for time

What I did?

  • I rewrote SQL to solve the above problem.
  • Added a dedicated parser statement for smallserial.
  • When type like serial, we modified it to use CREATE SEQUENCE instead of ALTER.

Best regard 👍

For example, I got result 259 when varchar size is 255. So expected 255.

I also fixed the problem that unexpected types will be returned.
@Code-Hex Code-Hex closed this Dec 9, 2021
@Code-Hex Code-Hex deleted the master branch December 9, 2021 17:29
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

1 participant