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

PostgreSQL: Doesn't support (n CHAR) syntax, but only (n) syntax. #4662

Closed
2 tasks done
mkarg opened this issue Aug 11, 2023 · 0 comments · Fixed by #4664
Closed
2 tasks done

PostgreSQL: Doesn't support (n CHAR) syntax, but only (n) syntax. #4662

mkarg opened this issue Aug 11, 2023 · 0 comments · Fixed by #4664

Comments

@mkarg
Copy link
Contributor

mkarg commented Aug 11, 2023

Search first

  • I searched and no similar issues were found

Description

Some RDBMS support units like CHAR in the length specifier, so schemas do exists using CHARACTER(n CHAR) or VARCHAR(n CHAR) units.

Unfortunately this leads to an SQL exception when applying such a schema on PostgreSQL, as that RDBMS does not support the CHAR specifier.

Steps To Reproduce

<createTable tableName="T">
  <column name="c" type="VARCHAR(20 CHAR)"/>
</createTable)
liquibase update

Expected/Desired Behavior

PostgreSQL ignores the CHAR unit, as it implicitly interprets the value as characters.

Liquibase Version

master

Database Vendor & Version

PostgreSQL 15.3

Liquibase Integration

N/A

Liquibase Extensions

N/A

OS and/or Infrastructure Type/Provider

Debian 12.2.0-14

Additional Context

N/A

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
mkarg added a commit to mkarg/liquibase that referenced this issue Aug 11, 2023
filipelautert pushed a commit to mkarg/liquibase that referenced this issue Aug 29, 2023
filipelautert pushed a commit to mkarg/liquibase that referenced this issue Sep 20, 2023
filipelautert pushed a commit to mkarg/liquibase that referenced this issue Sep 20, 2023
filipelautert added a commit that referenced this issue Oct 17, 2023
…(n) syntax. (#4664)

* Fixed: #4662 - PostgreSQL: Doesn't support (n CHAR) syntax, but only (n) syntax.

* Change saved_state

* Revert "Change saved_state"

This reverts commit da79108.

* Use the type name instead of redefining it.

---------

Co-authored-by: filipe <flautert@liquibase.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants