The following query crashes the backend if compiled with
"--enable-integer-datetimes":

select 'T0.405065555555533333333333333333333333333333355555555555555555555555333333333335555555555555789 -08'::time with time zone;

Backtrace is:

#0  0x08179304 in DecodeTimeOnly (field=0xbfffebb0, ftype=0xbfffeb30,
nf=3, dtype=0xbfffebac, tm=0x33333333, fsec=0xbfffeca0, tzp=0xbfffec68)
at datetime.c:1529
#1  0x081765f9 in timetz_in (fcinfo=0xbfffecf0) at date.c:1272
#2  0x081cdf44 in OidFunctionCall3 (functionId=1350, arg1=140379844,
arg2=0, arg3=4294967295) at fmgr.c:1250
#3  0x080d459d in stringTypeDatum (tp=0x403abe10, string=0x85e06c4
"T0.4050655555555", '3' <repeats 30 times>, '5' <repeats 23 times>, '3'
<repeats 11 times>, '5' <repeats 13 times>, "789 -08", atttypmod=-1) at
parse_type.c:389
#4  0x080ce9a6 in parser_typecast_constant (expr=0x85e0754,
typename=0x85e076c) at parse_expr.c:1113
#5  0x080cd1bd in transformExpr (pstate=0x85e08e8, expr=0x85e0750) at
parse_expr.c:149
#6  0x080d56c0 in transformTargetEntry (pstate=0x85e08e8,
node=0x85e0750, expr=0x0, colname=0x0, resjunk=0 '\0') at
parse_target.c:59
#7  0x080d59e3 in transformTargetList (pstate=0x85e08e8,
targetlist=0x85e0824) at parse_target.c:191
#8  0x080bbd4a in transformSelectStmt (pstate=0x85e08e8, stmt=0x85e0840)
at analyze.c:2004
#9  0x080b8ea4 in transformStmt (pstate=0x85e08e8, parseTree=0x85e0840,
extras_before=0xbfffef6c, extras_after=0xbfffef68) at analyze.c:301
#10 0x080b8ab3 in parse_analyze (parseTree=0x85e0840,
parentParseState=0x0) at analyze.c:145
#11 0x0816b1b9 in pg_analyze_and_rewrite (parsetree=0x85e0840) at
postgres.c:413
#12 0x0816b4bc in pg_exec_query_string (query_string=0x85e0404,
dest=Remote, parse_context=0x85b6a38) at postgres.c:698
#13 0x0816c877 in PostgresMain (argc=4, argv=0xbffff220,
username=0x85b6299 "nconway") at postgres.c:1916
#14 0x08148d91 in DoBackend (port=0x85b6168) at postmaster.c:2229
#15 0x081484f5 in BackendStartup (port=0x85b6168) at postmaster.c:1863
#16 0x081473bf in ServerLoop () at postmaster.c:972
#17 0x08146ea8 in PostmasterMain (argc=3, argv=0x859b460) at
postmaster.c:754
#18 0x081183a7 in main (argc=3, argv=0xbffffba4) at main.c:204

Cheers,

Neil

-- 
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC



Fri, 28 Jun 2002 18:14:43 -0400
nconway@klamath.dyndns.org (Neil Conway)
bug in new timestamp code