Skip to content

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