Re: [GENERAL] Date Time data types

Поиск
Список
Период
Сортировка
От Murtuza Zabuawala
Тема Re: [GENERAL] Date Time data types
Дата
Msg-id CAKKotZQXnuTMkq+jdRbKYkT0=FdufoHiKhz9o01_nKrW1zFQZA@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Date Time data types  (Brahmam Eswar <brahmam1234@gmail.com>)
Список 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@gmail.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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Brahmam Eswar
Дата:
Сообщение: [GENERAL] Date Time data types
Следующее
От: Brahmam Eswar
Дата:
Сообщение: [GENERAL] Multiple key error .