Search Postgresql Archives

Re:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the explanation Kevin!

Regards,

Ruan




From: pgsql-general-owner@xxxxxxxxxxxxxx <pgsql-general-owner@xxxxxxxxxxxxxx> on behalf of K. Brannen <kbrannen@xxxxxxxxxx>
Sent: 03 November 2017 14:35
To: pgsql-general@xxxxxxxxxxxxxx
Subject:
 
Rhhh Lin <ruanlinehan@xxxxxxxxxxx> wrote:

> *Also, as a sidenote - can someone please expand on why one (I was not involved in the creation of this DB/schema definition) would choose to have the definition of the timestamp column as a bigint in this case?

Because the time value you need to hold exceeds 32 bits. :)

Based on your example, you're storing epoch in milliseconds, which exceeds 2^32, so you have to use bigint. Check out the size of the int and bigint data types in the docs.

HTH,
Kevin


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux