Re: Conversion of a column from Integer format type to 'timestamp with time zone'

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Conversion of a column from Integer format type to 'timestamp with time zone'
Дата
Msg-id CAKFQuwZYWsBb49OZsS=H-SDhCu2_tSFiypiX7mfbQTyAZMobWg@mail.gmail.com
обсуждение исходный текст
Ответ на Conversion of a column from Integer format type to 'timestamp with time zone'  (Raj kumar <rajkumar820999@gmail.com>)
Ответы Re: Conversion of a column from Integer format type to 'timestamp with time zone'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
On Thu, Jan 26, 2023 at 12:45 PM Raj kumar <rajkumar820999@gmail.com> wrote:
Hi, there is a column 'created' in the 'customers' table which is actually supposed to be a 'timestamp with time zone' column but stored in this Integer format. How do I typecast this to 'timestamp with time zone' format?

select created from customers limit 3;
    created
---------------
 1521521848681
 1508995056368
 1521559994299
(3 rows)


We have no way of knowing what the corresponding point-in-time a 0 in that column represents.  Or, for that matter, what a 1 means.

David J.

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

Предыдущее
От: Raj kumar
Дата:
Сообщение: Conversion of a column from Integer format type to 'timestamp with time zone'
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Conversion of a column from Integer format type to 'timestamp with time zone'