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: missing castfunc in pg_proc #94955

Closed
knz opened this issue Jan 9, 2023 · 2 comments
Closed

sql: missing castfunc in pg_proc #94955

knz opened this issue Jan 9, 2023 · 2 comments
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@knz
Copy link
Contributor

knz commented Jan 9, 2023

Found while working on #88061.

Describe the problem

The castfunc column contains all NULLs; instead it should contain the OID of the built-in functions that do the conversion.

To Reproduce

SELECT pg_catalog.format_type(castsource, NULL) as src,
 pg_catalog.format_type(casttarget, NULL) as dst,
 proname AS function
FROM pg_cast c
LEFT JOIN pg_proc p ON p.oid = c.castfunc

Expected behavior

The output for e.g. the conversion from boolean to text should be proname = 'text'.

cc @rafiss for triage.

Jira issue: CRDB-23242

Epic CRDB-17785

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-pgcompat Semantic compatibility with PostgreSQL labels Jan 9, 2023
@knz knz added this to Triage in SQL Sessions - Deprecated via automation Jan 9, 2023
@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Jan 9, 2023
@rafiss
Copy link
Collaborator

rafiss commented Jan 9, 2023

We currently do not use built-in functions to perform casts, though @jordanlewis just started to explore that idea in #94859

@rafiss
Copy link
Collaborator

rafiss commented Mar 3, 2023

closed by #97093 - thanks @otan !

@rafiss rafiss closed this as completed Mar 3, 2023
SQL Sessions - Deprecated automation moved this from Triage to Done Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
No open projects
Development

No branches or pull requests

2 participants