Re: [GENERAL] Date Time data types

From: "Rakesh Kumar" <rakeshkumar464(at)mail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Date Time data types
Date: 2017-11-23 13:35:25
Message-ID: trinity-129ac1f7-4c97-4420-8afc-7538210b6384-1511444125725@3c-app-mailcom-lxa07
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>What is difference between CLOCK_TIMESTAMP() and CURRENT_TIMESTAMP?

CURRENT_TIMESTAMP stays the same within the transaction. It is very useful when you
are you inserting to multiple tables and want to use the timestamp columns to chain the rows
together.

CLOCK_TIMESTAMP is the true timestamp at that given instant. Useful for debugging
purposes. I hardly see a use of it in applications, for reasons mentioned above.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dmitry Lazurkin 2017-11-23 17:52:51 Implementation of gtrgm_out for gevel
Previous Message Durumdara 2017-11-23 12:19:25 Re: Set role dynamically from proc