Code for SET/SHOW TIME ZONE with a fixed-interval timezone was not
prepared for HAVE_INT64_TIMESTAMP. Per report from Guillaume Beaudoin.
This commit is contained in:
parent
b38bcb2fa0
commit
39c9398956
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.88.2.1 2004/08/11 21:10:50 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.88.2.2 2005/06/05 01:48:55 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -454,7 +454,11 @@ assign_timezone(const char *value, bool doit, bool interactive)
|
|||||||
if (doit)
|
if (doit)
|
||||||
{
|
{
|
||||||
/* Here we change from SQL to Unix sign convention */
|
/* Here we change from SQL to Unix sign convention */
|
||||||
|
#ifdef HAVE_INT64_TIMESTAMP
|
||||||
|
CTimeZone = -(interval->time / INT64CONST(1000000));
|
||||||
|
#else
|
||||||
CTimeZone = -interval->time;
|
CTimeZone = -interval->time;
|
||||||
|
#endif
|
||||||
HasCTZSet = true;
|
HasCTZSet = true;
|
||||||
}
|
}
|
||||||
pfree(interval);
|
pfree(interval);
|
||||||
@ -608,7 +612,11 @@ show_timezone(void)
|
|||||||
Interval interval;
|
Interval interval;
|
||||||
|
|
||||||
interval.month = 0;
|
interval.month = 0;
|
||||||
|
#ifdef HAVE_INT64_TIMESTAMP
|
||||||
|
interval.time = -(CTimeZone * INT64CONST(1000000));
|
||||||
|
#else
|
||||||
interval.time = -CTimeZone;
|
interval.time = -CTimeZone;
|
||||||
|
#endif
|
||||||
|
|
||||||
tzn = DatumGetCString(DirectFunctionCall1(interval_out,
|
tzn = DatumGetCString(DirectFunctionCall1(interval_out,
|
||||||
IntervalPGetDatum(&interval)));
|
IntervalPGetDatum(&interval)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user