"Matthias Lenz" <ml134883(at)inf(dot)tu-dresden(dot)de> writes:
> List *i;
> i=nth(1, stmt->fromClause);
> ((RangeVar *) lfirst(i))->relname = "s_overall";
nth() is going to give you a list element, not a List*. So you don't
want the lfirst() call. I'm also dubious about whether you didn't mean
nth(0, stmt->fromClause) --- nth() counts from zero not one. Finally,
it seems extremely fragile to assume that fromClause entries are
necessarily RangeVars without checking. There are other node types that
could be there.
regards, tom lane