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.
gdb
's "[b]reak <function name or filename:line# or *memory address> " command to set a breakpoint at yourif (var->varattno < 0)
line, and set yourwatch
, aftervar->varattno
means something. Delete the breakpoint and continue. There are severealgdb
resources online. – waltinator Aug 31 '23 at 03:31