aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regcomp.c
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2021-08-27 16:24:33 +0200
committerDaniel Gustafsson <dgustafsson@postgresql.org>2021-08-27 16:24:33 +0200
commitd782d5987e1022ba70171bcf3507cd87564ef23c (patch)
tree5af5cf4046b508b07dabb03a9c272c906f049358 /src/backend/regex/regcomp.c
parentabc0910e2e0adfc5a17e035465ee31242e32c4fc (diff)
downloadpostgresql-d782d5987e1022ba70171bcf3507cd87564ef23c.tar.gz
postgresql-d782d5987e1022ba70171bcf3507cd87564ef23c.zip
Avoid invoking PQfnumber in loop constructs
When looping over the resultset from a SQL query, extracting the field number before the loop body to avoid repeated calls to PQfnumber is an established pattern. On very wide tables this can have a performance impact, but it wont be noticeable in the common case. This fixes a few queries which were extracting the field number in the loop body. Author: Hou Zhijie <houzj.fnst@fujitsu.com> Reviewed-by: Nathan Bossart <bossartn@amazon.com> Discussion: https://postgr.es/m/OS0PR01MB57164C392783F29F6D0ECA0B94139@OS0PR01MB5716.jpnprd01.prod.outlook.com
Diffstat (limited to 'src/backend/regex/regcomp.c')
0 files changed, 0 insertions, 0 deletions