The following bug has been logged on the website:
Bug reference: 15910
Logged by: Alexander Lakhin
Email address: exclusion@gmail.com
PostgreSQL version: 12beta2
Operating system: Ubuntu 18.04
Description:
When executing the following query:
SELECT time with time zone '04:05:06 m2';
I get a strange result:
timetz
-------------------
04:05:06+02:30:17
and the valgrind errors:
==00:00:00:07.177 31724== Conditional jump or move depends on uninitialised
value(s)
==00:00:00:07.177 31724== at 0x57333D: DetermineTimeZoneOffsetInternal
(datetime.c:1485)
==00:00:00:07.177 31724== by 0x573DA6: DetermineTimeZoneOffset
(datetime.c:1445)
==00:00:00:07.177 31724== by 0x575FEE: DecodeTimeOnly (datetime.c:2317)
==00:00:00:07.177 31724== by 0x570D6B: timetz_in (date.c:1994)
==00:00:00:07.177 31724== by 0x67356B: InputFunctionCall (fmgr.c:1548)
==00:00:00:07.177 31724== by 0x67378C: OidInputFunctionCall
(fmgr.c:1651)
==00:00:00:07.177 31724== by 0x30C312: stringTypeDatum
(parse_type.c:641)
==00:00:00:07.177 31724== by 0x2F282F: coerce_type (parse_coerce.c:304)
==00:00:00:07.177 31724== by 0x2F1B15: coerce_to_target_type
(parse_coerce.c:103)
==00:00:00:07.177 31724== by 0x2F8E4A: transformTypeCast
(parse_expr.c:2813)
==00:00:00:07.177 31724== by 0x2F83F8: transformExprRecurse
(parse_expr.c:202)
==00:00:00:07.177 31724== by 0x2F807F: transformExpr (parse_expr.c:155)
==00:00:00:07.177 31724== Uninitialised value was created by a stack
allocation
==00:00:00:07.177 31724== at 0x570C8E: timetz_in (date.c:1972)
==00:00:00:07.177 31724==
...
==00:00:00:07.179 31724== Conditional jump or move depends on uninitialised
value(s)
==00:00:00:07.179 31724== at 0x6B2165: pg_next_dst_boundary
(localtime.c:1698)
==00:00:00:07.179 31724== by 0x573447: DetermineTimeZoneOffsetInternal
(datetime.c:1508)
==00:00:00:07.179 31724== by 0x573DA6: DetermineTimeZoneOffset
(datetime.c:1445)
==00:00:00:07.179 31724== by 0x575FEE: DecodeTimeOnly (datetime.c:2317)
==00:00:00:07.179 31724== by 0x570D6B: timetz_in (date.c:1994)
==00:00:00:07.179 31724== by 0x67356B: InputFunctionCall (fmgr.c:1548)
==00:00:00:07.179 31724== by 0x67378C: OidInputFunctionCall
(fmgr.c:1651)
==00:00:00:07.179 31724== by 0x30C312: stringTypeDatum
(parse_type.c:641)
==00:00:00:07.179 31724== by 0x2F282F: coerce_type (parse_coerce.c:304)
==00:00:00:07.179 31724== by 0x2F1B15: coerce_to_target_type
(parse_coerce.c:103)
==00:00:00:07.179 31724== by 0x2F8E4A: transformTypeCast
(parse_expr.c:2813)
==00:00:00:07.179 31724== by 0x2F83F8: transformExprRecurse
(parse_expr.c:202)
==00:00:00:07.180 31724== Uninitialised value was created by a stack
allocation
==00:00:00:07.180 31724== at 0x570C8E: timetz_in (date.c:1972)