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

Populate INFORMATION_SCHEMA.ROUTINES and PARAMETERS #104083

Closed
lukaseder opened this issue May 30, 2023 · 3 comments · Fixed by #105944
Closed

Populate INFORMATION_SCHEMA.ROUTINES and PARAMETERS #104083

lukaseder opened this issue May 30, 2023 · 3 comments · Fixed by #105944
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner

Comments

@lukaseder
Copy link

lukaseder commented May 30, 2023

Describe the solution you'd like

For increased PostgreSQL compatibility, it would be useful to have user defined functions be listed in INFORMATION_SCHEMA.ROUTINES and PARAMETERS:

create function f (i text) returns text as $$ select i $$ language sql;
select * from information_schema.routines;

This just produces an empty result.

Describe alternatives you've considered

I can obviously reverse engineer pg_catalog.pg_proc:

select * from pg_catalog.pg_proc where proname = 'f'

But I find that table much less user friendly than the INFORMATION_SCHEMA one.

Additional context

This is for jOOQ source code generation: jOOQ/jOOQ#13947

Jira issue: CRDB-28347

Epic CRDB-27601

@lukaseder lukaseder added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label May 30, 2023
@blathers-crl
Copy link

blathers-crl bot commented May 30, 2023

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I have CC'd a few people who may be able to assist you:

  • @cockroachdb/sql-foundations (found keywords: pg_,ORM,jOOQ)

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-triaged blathers was able to find an owner labels May 30, 2023
@lukaseder
Copy link
Author

The workaround is probably to copy paste the PostgreSQL definition of the views and inline those wherever ROUTINES and PARAMETERS are referenced:
https://github.com/postgres/postgres/blob/master/src/backend/catalog/information_schema.sql

@xinhaoz xinhaoz added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Jun 1, 2023
@blathers-crl blathers-crl bot added this to Done [after migration] in SQL Foundations Jun 1, 2023
@rafiss rafiss moved this from Done [after migration] to Triage in SQL Foundations Jun 6, 2023
@rafiss rafiss added E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue labels Jun 6, 2023
@haquem1
Copy link

haquem1 commented Jun 13, 2023

@lukaseder I'd like to give this a shot. Just getting started in OSS and looking to level up my SQL foundational skills for data platforms!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner
Projects
Development

Successfully merging a pull request may close this issue.

4 participants