We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Internal format for TimeTZ — Vertica Forum

Internal format for TimeTZ

Hi,

I have to handle TimeTZ in UDx c++. Normally I do not allow TimeTZ in tables, but user managed to create new table with TimeTZ datatype and it was too late when I caught it.

After few experiments, I found that TimeTZ in Vertica has number of micros since UTC midnight in top 5 bytes of 8-byte value.

Out of curiosity, what lower 3 bytes of TimeTZ contains? Looking at Postgress code, it should be number of seconds since epoch, but PgSQL TimeTZ is 12 bytes vs Vertica 8 bytes.

Looks like Vertica original developers invented something new for content of lower 3 bytes in TimeTZ.

Would you mind to ask around and share?

Thanks in advance
Sergey

Best Answer

  • SergeBSergeB - Select Field - Employee
    Answer ✓

    I think the lower 24 bits represent the timezone as UTC offset in seconds.

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file