Re: User functions and AIX - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: User functions and AIX
Date
Msg-id 20010528190607.E9CD21AAA@druid.net
Whole thread Raw
In response to Re: User functions and AIX  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: User functions and AIX
List pgsql-hackers
Thus spake Tom Lane
> darcy@druid.net (D'Arcy J.M. Cain) writes:
> > The top of the backtrace looks like this.
> 
> > #0  0x0 in ?? () from (unknown load module)
> > #1  0xd1087a60 in chkpass_in (fcinfo=0x0) at chkpass.c:88
> > #2  0x10045cf4 in or_clause (clause=0x0) at clauses.c:211
> > #3  0x10075d68 in int82ge (fcinfo=0x1015cfc8) at int8.c:343
> > #4  0x1005909c in _readArrayRef () at readfuncs.c:924
> > #5  0x10059b68 in _readSeqScan () at readfuncs.c:600
> 
> I don't believe a word of that backtrace, and neither should you.
> The alleged call arcs at levels below #1 do not exist in the code.
> Ergo, I doubt the top two levels can be trusted either.

Can you clarify?  I see or_clause takes a clause arg and I assumed that
the fcinfo is hidden in the macro.  I don't understand how the arg for
chkpass_in can be NULL.  I'm also not sure why these functions are involved
in reading the chkpass type.

Hmm.  I just rebooted and reran the test (SELECT 'hello'::chkpass) and
it gave me a different stacktrace.  It looks like this.

#0  0x0 in ?? () from (unknown load module)
#1  0xd1085a60 in chkpass_in (fcinfo=0x0) at chkpass.c:88
#2  0x1004b874 in OidFunctionCall3 (functionId=269952520, arg1=269952532,    arg2=269952540, arg3=269952548) at
fmgr.c:1136
#3  0x1007f350 in stringTypeDatum (tp=0x10172694, string=0x101726a0 "pendant",    atttypmod=269952680) at
parse_type.c:181
#4  0x10060630 in parser_typecast_constant (expr=0x10172794,    typename=0x101727a0) at parse_expr.c:876
#5  0x10061188 in transformExpr (pstate=0x10172910, expr=0x10172920,    precedence=269953332) at parse_expr.c:118
#6  0x10076f28 in transformTargetEntry (pstate=0x258, node=0x5c,    expr=0x2ff1df70, colname=0x101729f4 "inner",
resjunk=16'\020')   at parse_target.c:56
 
#7  0x10077198 in transformTargetList (pstate=0x10172ab8,    targetlist=0x10172ac0) at parse_target.c:158
#8  0x10093c10 in transformSelectStmt (pstate=0x10172b80, stmt=0x10172b88)   at analyze.c:1835
#9  0x1009497c in transformStmt (pstate=0x20000890, parseTree=0x2001f43c)   at analyze.c:226
#10 0x10094ca4 in parse_analyze (parseTree=0x100195f8,    parentParseState=0x200008a4) at analyze.c:86

I still can't follow the logic through the code.  And chkpass_in is still
being called with a null pointer according to this.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: New/old style trigger API
Next
From: Tom Lane
Date:
Subject: Re: User functions and AIX