| From: | Rhhh Lin <ruanlinehan(at)hotmail(dot)com> |
|---|---|
| To: | "K(dot) Brannen" <kbrannen(at)pwhome(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: |
| Date: | 2017-11-04 02:28:03 |
| Message-ID: | DB6PR1001MB114161C36608B56AAA57027EAE520@DB6PR1001MB1141.EURPRD10.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thanks for the explanation Kevin!
Regards,
Ruan
________________________________
From: pgsql-general-owner(at)postgresql(dot)org <pgsql-general-owner(at)postgresql(dot)org> on behalf of K. Brannen <kbrannen(at)pwhome(dot)com>
Sent: 03 November 2017 14:35
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL]
Rhhh Lin <ruanlinehan(at)hotmail(dot)com> 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(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rhhh Lin | 2017-11-04 02:29:05 | Re: EXPLAIN <query> command just hangs... |
| Previous Message | Rhhh Lin | 2017-11-04 02:27:17 | Re: EXPLAIN <query> command just hangs... |