Postgres TEXT columns are recommended by the the core developers, yet Directus limits text functionality vs varchar #12661
Replies: 1 comment
-
Heya! Thank you for taking the time to submit this request! It has been over 90 days, and this discussion has not received at least 15 votes from the community. This means that we don't feel like there's enough community interest to warrant further R&D into this topic at this time. 🧊 This request will now be closed to keep our discussions tidy. Please reach out if you have any questions! For more information, see our Feature Request Process. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the Bug
TEXT and VARCHAR are functionally identical in Postgres, and the devs recommend using TEXT.
https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_varchar.28n.29_by_default
However in Directus, a lot of functionality is limited only to fields recognized as a short string/varchar. text is treated like as a large text field like the mysql paradigm.
If the Postgres database only uses text/citext, instead of varchar, then none of the possible Display/Interface options are available (that string/varchar have).
Additionally there is no way to hint to Directus, or cast a column as another type.
Ideally, it would be possible to override the detected datatype in the schema DataModel screen.
To Reproduce
Create two fields. One varchar, and one text.
Note the difference in Directus for possible Display/Interface options.
The recognized datatype is a read-only field.
Errors Shown
No response
What version of Directus are you using?
9.8.0
What version of Node.js are you using?
16.14.2
What database are you using?
postgres 14
What browser are you using?
chrome
How are you deploying Directus?
CLI npm package
Beta Was this translation helpful? Give feedback.
All reactions