Adds null check for node in HasRangeTableRef

pull/7604/head
gurkanindibay 2024-05-20 15:47:01 +03:00
parent 035aa6eada
commit a7aee78e85
1 changed files with 5 additions and 0 deletions

View File

@ -504,6 +504,11 @@ FilterShardsFromPgclass(Node *node, void *context)
static bool
HasRangeTableRef(Node *node, int *varno)
{
if (node == NULL)
{
return false;
}
if (IsA(node, RangeTblRef))
{
RangeTblRef *rangeTblRef = (RangeTblRef *) node;