* Produce a NullTest node from an IS [NOT] DISTINCT FROM NULL construct * * "arg" is the untransformed other argument */
| 3145 | * "arg" is the untransformed other argument |
| 3146 | */ |
| 3147 | static Node * |
| 3148 | make_nulltest_from_distinct(ParseState *pstate, A_Expr *distincta, Node *arg) |
| 3149 | { |
| 3150 | NullTest *nt = makeNode(NullTest); |
| 3151 | |
| 3152 | nt->arg = (Expr *) transformExprRecurse(pstate, arg); |
| 3153 | /* the argument can be any type, so don't coerce it */ |
| 3154 | if (distincta->kind == AEXPR_NOT_DISTINCT) |
| 3155 | nt->nulltesttype = IS_NULL; |
| 3156 | else |
| 3157 | nt->nulltesttype = IS_NOT_NULL; |
| 3158 | /* argisrow = false is correct whether or not arg is composite */ |
| 3159 | nt->argisrow = false; |
| 3160 | nt->location = distincta->location; |
| 3161 | return (Node *) nt; |
| 3162 | } |
| 3163 | |
| 3164 | /* |
| 3165 | * Produce a string identifying an expression by kind. |
no test coverage detected