Skip to content

sql: implement the pg_timezone_names table#94122

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
otan-cockroach:pg_timezone_names
Dec 23, 2022
Merged

sql: implement the pg_timezone_names table#94122
craig[bot] merged 1 commit intocockroachdb:masterfrom
otan-cockroach:pg_timezone_names

Conversation

@otan
Copy link
Copy Markdown
Contributor

@otan otan commented Dec 22, 2022

Informs #84505

Release note (sql change): Implement the pg_timezone_names pg_catalog table, which lists all supported timezones.

@otan otan requested review from a team and rafiss December 22, 2022 04:52
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is timely! we just got cockroachdb/docs#15873, and looks like this will resolve it

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan)


pkg/sql/pg_catalog.go line 4154 at r1 (raw file):

func addRowForTimezoneNames(tz string, t time.Time, addRow func(...tree.Datum) error) error {
	abbrev, offset := t.Zone()
	d := duration.MakeDuration(int64(offset)*int64(time.Second), 0, 0)

what is this multiplication meant to calculate?


pkg/sql/pg_catalog.go line 4159 at r1 (raw file):

		tree.NewDString(abbrev), // abbrev
		tree.NewDInterval(d, types.DefaultIntervalTypeMetadata), // utc_offset
		tree.MakeDBool(tree.DBool(t.IsDST())),                   // is_dist

nit: comment should be is_dst

@otan otan force-pushed the pg_timezone_names branch 3 times, most recently from 86564a0 to 4bfa781 Compare December 22, 2022 22:37
@otan
Copy link
Copy Markdown
Contributor Author

otan commented Dec 22, 2022

bors r=rafiss

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 23, 2022

Merge conflict.

Release note (sql change): Implement the `pg_timezone_names` pg_catalog
table, which lists all supported timezones.
@otan otan force-pushed the pg_timezone_names branch from 4bfa781 to e1be665 Compare December 23, 2022 03:28
@otan
Copy link
Copy Markdown
Contributor Author

otan commented Dec 23, 2022

bors r=rafiss

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 23, 2022

Build succeeded:

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.

3 participants