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

Support primitive collections as JSON (instead of an array) #3122

Open
roji opened this issue Mar 4, 2024 · 0 comments
Open

Support primitive collections as JSON (instead of an array) #3122

roji opened this issue Mar 4, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@roji
Copy link
Member

roji commented Mar 4, 2024

The default - and natural - way to map a primitive collection (e.g. int[]) in PostgreSQL is to a database array (the PG integer[]) type. This is PG-unique feature; in other database, primitive collections are mapped to a JSON text column in the database.

However, in some cases it may still make sense to map primitive collections to JSON in PG, just like we do in other databases. While we seem to support the mapping itself, most forms of querying won't work (e.g. we need to translate to jsonb_to_recordset instead of unnest).

Since mapping to PG arrays is the recommended way, this isn't likely to be high priority. Putting this in the backlog to gather user feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant