timestamp9

The timestamp9 module provides an efficient, nanosecond-precision timestamp data type and related functions and operators.

The Greenplum Database timestamp9 module is based on version 1.1.0 of the timestamp9 module used with PostgreSQL.

Installing and Registering the Module

The timestamp9 module is installed when you install Greenplum Database. Before you can use the data type defined in the module, you must register the timestamp9 extension in each database in which you want to use the type:

CREATE EXTENSION timestamp9;

Refer to Installing Additional Supplied Modules for more information.

Module Documentation

Refer to the timestamp9 github documentation for detailed information about using the module.

Additional Documentation

You can set the TimeZone server configuration parameter to specify the time zone that Greenplum Database uses when it prints a timestamp9 timestamp. When you set this parameter, Greenplum Database displays the timestamp value in that time zone. For example:

testdb=# SELECT now()::timestamp9;
                 now
-------------------------------------
 2022-08-24 18:08:01.729360000 +0800
(1 row)

testdb=# SET timezone TO 'UTC+2';
SET
testdb=# SELECT now()::timestamp9;
                 now
-------------------------------------
 2022-08-24 08:08:12.995542000 -0200
(1 row)

Limitations

The timestamp9 data type does not support arithmetic calculations with nanoseconds.

check-circle-line exclamation-circle-line close-line
Scroll to top icon