We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe6e10c commit c7c7d71Copy full SHA for c7c7d71
src/utils.c
@@ -101,9 +101,10 @@ get_tableoids_list(List *tlist)
101
if (!IsA(var, Var))
102
continue;
103
104
- if (strlen(te->resname) > TABLEOID_STR_BASE_LEN &&
105
- 0 == strncmp(te->resname, TABLEOID_STR(""), TABLEOID_STR_BASE_LEN) &&
106
- var->varoattno == TableOidAttributeNumber)
+ /* Check that column name begins with TABLEOID_STR & it's tableoid */
+ if (var->varoattno == TableOidAttributeNumber &&
+ (te->resname && strlen(te->resname) > TABLEOID_STR_BASE_LEN) &&
107
+ 0 == strncmp(te->resname, TABLEOID_STR(""), TABLEOID_STR_BASE_LEN))
108
{
109
result = lappend(result, te);
110
}
0 commit comments