-
Notifications
You must be signed in to change notification settings - Fork 25
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
Data type/column type: array #48
Comments
I think using such database specific feature is out of scope from Rezoom point of view. So just use raw Postgre SQL or traditional relational DB way: N-M relationship between blog posts and tags. |
With vendor statements I could do the imagining altering the table by adding a field and separate tables. But then, I don't see a way to properly query (select) for this field among other fields. There are no per-field vendor statements, are there? Maybe this specific feature is out of the project's scope but some support for custom field types would be nice. |
You might be able to finagle this into working by using dynamic SQL, using the unsafe_inject_raw function any time you select the array-typed column or want to call PostGres array-related functions on it. I haven't tried but I think it might come through as a If your use case is really something like blog post and tags, seriously consider a good-old many-many relationship with tables |
PostgreSQL supports arrays as a datatype:
https://www.postgresql.org/docs/9.1/arrays.html
For instance, a table
blogposts
could contain a column namedtags
which would be of typetext[]
.I want to write a migration where a table is created with such field. I couldn't find anything about arrays in Rezoom, is there something I missed or any workaround for it?
EDIT: OK, I just found https://rspeele.gitbooks.io/rezoom-sql/doc/Language/Functions/PostgresFunctions.html noting that arrays are not supported nor planned. Still, I would be glad to see a workaround (by using Postgre's arrays feature).
The text was updated successfully, but these errors were encountered: