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

sql: support ENUM types #24873

Open
jseldess opened this issue Apr 17, 2018 · 9 comments
Open

sql: support ENUM types #24873

jseldess opened this issue Apr 17, 2018 · 9 comments

Comments

@jseldess
Copy link
Contributor

@jseldess jseldess commented Apr 17, 2018

Special case of #25123.

Feature request: Postgres supports ENUM types for defining columns that can contain only a given set of values. CockroachDB should, too.

https://www.postgresql.org/docs/10/static/datatype-enum.html

Special note:

Whenever a user-defined type is created (with CREATE TYPE), PostgreSQL automatically creates an associated array type, whose name consists of the element type's name prepended with an underscore, and truncated if necessary to keep it less than NAMEDATALEN bytes long. (If the name so generated collides with an existing type name, the process is repeated until a non-colliding name is found.) This implicitly-created array type is variable length and uses the built-in input and output functions array_in and array_out. The array type tracks any changes in its element type's owner or schema, and is dropped if the element type is.

@danhhz

This comment has been minimized.

Copy link
Contributor

@danhhz danhhz commented Apr 17, 2018

This would also be an important building block in query planning for some instances of partitioned tables. Some background on this at https://github.com/cockroachdb/cockroach/blob/2f2cb3af3df0bebf01bd2f0bb9c8329ad44229df/docs/RFCS/20170921_sql_partitioning.md#query-planning-changes

@knz knz added this to To do in (DEPRECATED) SQL Front-end, Lang & Semantics via automation Apr 17, 2018
@knz

This comment has been minimized.

Copy link
Member

@knz knz commented Apr 17, 2018

cc @awoods187 for prioritization

@knz knz moved this from Triage to Feature requests / nice-to-have in (DEPRECATED) SQL Front-end, Lang & Semantics Apr 27, 2018
@awoods187 awoods187 changed the title Support for ENUM and SET types Support for ENUM type Jul 11, 2018
@awoods187

This comment has been minimized.

Copy link
Contributor

@awoods187 awoods187 commented Jul 11, 2018

Split SET into a new issue #27415

@knz knz changed the title Support for ENUM type sql: support ENUM types Jul 20, 2018
@knz knz mentioned this issue Jul 20, 2018
0 of 5 tasks complete
@BramGruneir BramGruneir mentioned this issue Jan 2, 2019
2 of 14 tasks complete
@knz knz removed their assignment Jan 3, 2019
@sheenaagrawal

This comment has been minimized.

Copy link

@sheenaagrawal sheenaagrawal commented Jan 21, 2019

In which release can we expect this feature?

@knz

This comment has been minimized.

Copy link
Member

@knz knz commented Jan 21, 2019

It's not planned yet.

@orefalo

This comment has been minimized.

Copy link

@orefalo orefalo commented Feb 2, 2019

No Enum? that's a show stopper for me.

don't understand what makes this simple constraint so difficult to implement.

@knz

This comment has been minimized.

Copy link
Member

@knz knz commented Feb 2, 2019

@orefalo

This comment has been minimized.

Copy link

@orefalo orefalo commented Feb 2, 2019

Thank you. But then.. custom types are also missing, and stored procedure also seem to have their issues.
Hum.. It's not going to be that easy to get Graphile working against cockroach.

;-)

@jordanlewis jordanlewis added this to Triage in SQL Execution Team Apr 23, 2019
@jordanlewis jordanlewis moved this from Triage to Lower priority backlog in SQL Execution Team Apr 25, 2019
@spacejam101

This comment has been minimized.

Copy link

@spacejam101 spacejam101 commented May 10, 2019

Very excited for this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
SQL Execution Team
  
Lower priority backlog
(DEPRECATED) SQL Front-end, Lang & Se...
  
Feature requests / pie-in-the-skie
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.