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

Add array type support for postgresql #275

Open
aliendrew opened this issue Aug 4, 2023 · 0 comments · May be fixed by #276
Open

Add array type support for postgresql #275

aliendrew opened this issue Aug 4, 2023 · 0 comments · May be fixed by #276

Comments

@aliendrew
Copy link

Is your feature request related to a problem? Please describe.
Currently metaschema supports arrays and sets but metasql is unable to properly handle array types.

Describe the solution you'd like
Add postgresql array type support for metasql, so it can be properly handled.
I suggest the following:

points: {
  type: 'array',
  value: 'number',
  dims: [24, 32, 48],
  required: true,
}

to

"points" integer[24][32][48] NOT NULL

points: {
  type: 'array',
  value: 'number',
  dims: 3,
  required: true,
}

to

"points" integer[][][] NOT NULL

points: { array: 'number', length: 2 }

to

"points" integer ARRAY[2] NOT NULL

points: { array: 'number' }

to

"points" integer ARRAY NOT NULL

FYI:
https://www.postgresql.org/docs/current/arrays.html

@aliendrew aliendrew linked a pull request Aug 4, 2023 that will close this issue
5 tasks
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 a pull request may close this issue.

1 participant