How to extract from timezone

Hi.

What is the correct statement of EXTRACT when used with timezonetz?

SELECT extract(hour from timestamp with time zone ‘2018-01-23 19:07:00.00+07’);
pq: unknown signature: extract(string, timestamptz)

Thank you

Hi stanleycia,

Your syntax is correct, but using extract() with timestamptz was not enabled in the 1.1 release. It currently works on master, added on October 5th: https://github.com/cockroachdb/cockroach/pull/19045

It will be part of the upcoming 2.0 release, and should also be available if you use any of our alpha releases from after the change was committed.