0

code snippet:

foreach(lc, vars)
{
    if (IsA(lfirst(lc), Var))
    {
        Var *var = (Var *) lfirst(lc);
        /* if system column, return error */
        if (var->varattno < 0)
            ereport(ERROR,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                        errmsg("system column is not supported on incrementally maintainable materialized view")));
    }
}

what I tried:

(gdb) watch var->varattno
Attempt to extract a component of a value that is not a structure pointer.

foreach will loop through. I want to see var->varattno when loop through.

jian
  • 567
  • Use gdb's "[b]reak​ <function name or filename:line# or *memory address> " command to set a breakpoint at your if (var->varattno < 0) line, and set your watch, after var->varattno means something. Delete the breakpoint and continue. There are severeal gdb resources online. – waltinator Aug 31 '23 at 03:31

0 Answers0