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

psqldef: error occurs if cast in check constraint #219

Closed
bubusuke opened this issue Mar 13, 2022 · 1 comment
Closed

psqldef: error occurs if cast in check constraint #219

bubusuke opened this issue Mar 13, 2022 · 1 comment

Comments

@bubusuke
Copy link
Contributor

Hi I fixed parse in check constraint.

A Parse error will occur if the CHECK constraint contains CAST as shown below.

    CREATE TABLE test (
      col text NOT NULL CHECK (col <> ''::text)
    );

error is.

found syntax error when parsing DDL "CREATE TABLE test (
          col text NOT NULL CHECK (col <> ''::text)
        )": syntax error at position 63 near 'text'

I think the cause is insufficient CAST support when parsing Value.

@k0kubun
Copy link
Collaborator

k0kubun commented Mar 15, 2022

merged #220. thanks!

@k0kubun k0kubun closed this as completed Mar 15, 2022
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

No branches or pull requests

2 participants