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

Create default value for array when creating table #970

Open
ogabeezle opened this issue Apr 6, 2020 · 0 comments
Open

Create default value for array when creating table #970

ogabeezle opened this issue Apr 6, 2020 · 0 comments

Comments

@ogabeezle
Copy link

@ogabeezle ogabeezle commented Apr 6, 2020

Describe the bug
i want to parse this sql

CREATE TABLE "public"."reconciliation_file_configs" (
    "delimiter" text DEFAULT ','::text,
    "organization_codes" text[] DEFAULT ARRAY[]::text[] NOT NULL,
);

it give me this error

Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "ARRAY" <S_IDENTIFIER>
    at line 1, column 1220.

To Reproduce
Steps to reproduce the behavior:

  1. CREATE TABLE "public"."table" (
    "delimiter" text DEFAULT ','::text,
    "text_array" text[] DEFAULT ARRAY[]::text[] NOT NULL,
    );

  2. Parsing this SQL using JSqlParser with this statements

  3. ParseException

Expected behavior
A clear and concise description of what you expected to happen.

System

  • Postgres
  • Java 1.8
  • JSqlParser 3.1
@ogabeezle ogabeezle changed the title Create default value when creating table Create default value for array when creating table Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.