1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Change TupleTableSlot->tts_nvalid to type AttrNumber.

Previously it was an int / 4 bytes. The maximum number of attributes
in a tuple is restricted by the maximum value Var->varattno, which is
an AttrNumber/int16. Hence use the same data type for
TupleTableSlot->tts_nvalid.

Author: Ashutosh Bapat
Discussion: https://postgr.es/m/20180220224318.gw4oe5jadhpmcdnm@alap3.anarazel.de
This commit is contained in:
Andres Freund
2018-09-25 15:59:46 -07:00
parent 5913b9bbf3
commit a598708ffa
3 changed files with 4 additions and 4 deletions

View File

@ -324,7 +324,7 @@ llvm_compile_expr(ExprState *state)
"");
LLVMBuildCondBr(b,
LLVMBuildICmp(b, LLVMIntUGE, v_nvalid,
l_int32_const(op->d.fetch.last_var),
l_int16_const(op->d.fetch.last_var),
""),
opblocks[i + 1], b_fetch);