Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pg_extension/bao_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static bool should_bao_optimize(Query* parse) {
if (parse->commandType != CMD_SELECT) return false;

// Iterate over all the relations in this query.
for (int i = 0; i < list_length(parse->rtable); i++) {
for (int i = 1; i <= list_length(parse->rtable); i++) {
relid = rt_fetch(i, parse->rtable)->relid;
// A relid of zero seems to have a special meaning, and it causes
// get_rel_namespace or get_namespace_name to crash. Relid of zero
Expand Down