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 Oid (Object Identifier Types) #16830

Open
neverchanje opened this issue May 20, 2024 · 2 comments
Open

Support Oid (Object Identifier Types) #16830

neverchanje opened this issue May 20, 2024 · 2 comments
Assignees
Labels
difficulty/medium Issues that need some knowledge of the whole system priority/medium type/feature
Milestone

Comments

@neverchanje
Copy link
Contributor

neverchanje commented May 20, 2024

Is your feature request related to a problem? Please describe.

Oid has become the common blocker for extending our supports to more PG ecosystem tools.
The idea is very simple - to support the oid type and its associated types, including regproc, regprocedure, regoper, regoperator, regclass, and regtype.

We don't have to support operations except for the type conversion from/to oid and text/varchar/regproc/regprocedure/regoper/regoperator/regclass/regtype.

from/to text oid regproc regprocedure regoper regoperator regclass regtype
text t t t t t t t t
oid t t t t t t t t
regproc t t t f f f f f
regprocedure t t f t f f f f
regoper t t f f t f f f
regoperator t t f f f t f f
regclass t t f f f f t f
regtype t t f f f f f t

Oid types should not be allowed to output in sinks.

Describe the solution you'd like

Solution 1:

Implementing oid as a pure alias of int32, and regproc/regprocedure/regoper/regoperator/regclass/regtype as an alias of text.

  • Pros: Easy to implement.
  • Cons: Unaligned with PG's behavior. In this case, as @xiangjinwu found, order by regproc would order by the text value, while PG's behavior is ordering based on the integer value (oid).

Solution 2:

Fully support these types in our type system.

  • Pros: 100% aligned with PG's behavior.
  • Cons: Implemention complexity is high.

Describe alternatives you've considered

No response

Additional context

This is not an urgent task, but worths some efforts once anyone have bandwidth.

Copy link
Contributor

This issue has been open for 60 days with no activity.

If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity label.

You can also confidently close this issue as not planned to keep our backlog clean.
Don't worry if you think the issue is still valuable to continue in the future.
It's searchable and can be reopened when it's time. 😄

@xiangjinwu
Copy link
Contributor

Will do a proof-of-concept in order to evaluate the feasibility of one approach I have in mind and have better understanding of the complexity of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/medium Issues that need some knowledge of the whole system priority/medium type/feature
Projects
None yet
Development

No branches or pull requests

2 participants