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

Add pg_tables and pg_views to catalog #1811

Merged
merged 5 commits into from
Aug 23, 2022
Merged

Conversation

skabbes
Copy link
Contributor

@skabbes skabbes commented Aug 22, 2022

Supersedes: #1748

Fixes: #1747

Problem - I was unable to write a query against pg_timezone_names.

Actual failing query

select
  name,
  abbrev,
  utc_offset,
  to_char((current_timestamp at time zone name), 'HH:MI am') as current_time
from pg_catalog.pg_timezone_names
order by utc_offset;

This because sqlc did not know about these built-in tables / views.

@kyleconroy kyleconroy merged commit 8fa5272 into sqlc-dev:main Aug 23, 2022
@skabbes skabbes deleted the pggen_tables branch August 23, 2022 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pg_catalog tables and views not queryable (specifically pg_timezone_names)
2 participants