aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2023-08-06 21:51:54 +1200
committerDavid Rowley <drowley@postgresql.org>2023-08-06 21:51:54 +1200
commit6c00d2c9d4c533dad4e0afe28cfde0e12e4eb4e0 (patch)
tree752f3ee99325426d3606a612f167f611e99b7566 /src/backend/executor/nodeModifyTable.c
parent81ccbe520f42a9873734c614e4eb521190d8f8e4 (diff)
downloadpostgresql-6c00d2c9d4c533dad4e0afe28cfde0e12e4eb4e0.tar.gz
postgresql-6c00d2c9d4c533dad4e0afe28cfde0e12e4eb4e0.zip
Tidy up join_search_one_level code
The code in join_search_one_level was a bit convoluted. With a casual glance, you might think that other_rels_list was being set to something other than joinrels[1] when level == 2, however, joinrels[level - 1] is joinrels[1] when level == 2, so nothing special needs to happen to set other_rels_list. Let's clean that up to avoid confusing anyone. In passing, we may as well modernize the loop in make_rels_by_clause_joins() and instead of passing in the ListCell to start looping from, let's just pass in the index where to start from and make use of for_each_from(). Ever since 1cff1b95a, Lists are arrays under the hood. lnext() and list_head() both seem a little too linked-list like. Author: Alex Hsieh, David Rowley, Richard Guo Reviewed-by: Julien Rouhaud Discussion: https://postgr.es/m/CANWNU8x9P9aCXGF%3DaT-A_8mLTAT0LkcZ_ySYrGbcuHzMQw2-1g%40mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions