From: | Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com> |
---|---|
To: | Brahmam Eswar <brahmam1234(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] Date Time data types |
Date: | 2017-11-23 09:37:56 |
Message-ID: | CAKKotZQXnuTMkq+jdRbKYkT0=FdufoHiKhz9o01_nKrW1zFQZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
As per my knowledge,
CLOCK_TIMESTAMP value changes every time you call it even in the
same transaction
BEGIN
...
CLOCK_TIMESTAMP() -- Gives 2017-11-23 15:02:27.492867+05:30
...
...
CLOCK_TIMESTAMP() -- Gives different time as per current clock time
...
END;
CURRENT_TIMESTAMP
is the time of
start of current transaction
and does not change in the same transaction.
BEGIN
...
CURRENT_TIMESTAMP() -- Gives 2017-11-23 15:01:40.171462+05:30
...
...
CURRENT_TIMESTAMP() -- Gives same time as previous call
...
END;
-- Murtuza
On Thu, Nov 23, 2017 at 2:29 PM, Brahmam Eswar <brahmam1234(at)gmail(dot)com>
wrote:
> What is difference between CLOCK_TIMESTAMP() and CURRENT_TIMESTAMP?
>
> Is there any specific use case to differentiate them .
> --
> Thanks & Regards,
> Brahmeswara Rao J.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Brahmam Eswar | 2017-11-23 11:31:13 | [GENERAL] Multiple key error . |
Previous Message | Brahmam Eswar | 2017-11-23 08:59:53 | [GENERAL] Date Time data types |