From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, petr(dot)fedorov(at)phystech(dot)edu |
Subject: | Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch |
Date: | 2020-09-14 18:53:48 |
Message-ID: | CAEudQAr8DuPthQL=exCBdGipb7aUYFx6=dOzsX=FPqTEsSRWDA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em seg., 14 de set. de 2020 às 15:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:
> Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> writes:
> > msvc 2019 (64 bits), is worried about it:
> > C:\dll\postgres\src\backend\utils\adt\dbsize.c(630,20): warning C4334:
> > '<<': resultado de 32-bit shift convertido implicitamente para 64 bits
> > (64-bit shift era pretendid
> > o?) [C:\dll\postgres\postgres.vcxproj]
>
> Yeah, most/all of the MSVC buildfarm members are showing this warning too.
> The previous coding was
>
> Int64GetDatum((int64) (1 << count))
>
> which apparently is enough to silence MSVC, though it makes no difference
> as to the actual overflow risk involved.
>
> I'm a bit inclined to make the new code be
>
> NumericGetDatum(int64_to_numeric(INT64CONST(1) << count));
>
+1
msvc 2019 (64 bits), is happy with INT64CONST(1)
regards,
Ranier Vilela
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-09-14 19:00:18 | Re: Allow ERROR from heap_prepare_freeze_tuple to be downgraded to WARNING |
Previous Message | Andres Freund | 2020-09-14 18:39:05 | Re: Allow ERROR from heap_prepare_freeze_tuple to be downgraded to WARNING |