The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Internal format for TimeTZ


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

Best Answer

  • SergeBSergeB - Select Field - Employee
    Answer ✓

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


Leave a Comment

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