Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> New item for TODO list:
> * SELECT aliname FROM pg_class aliname generates strange error
You don't need the alias; "SELECT pg_class FROM pg_class" generates
the same behavior.
Looks to me like the parser is failing to reject this query as malformed.
transformIdent() is willing to take either a column name or a relation
name (why?), and no one upstream is rejecting the relation-name case.
End result is an untransformed Ident node gets left in the parser
output, and neither the rewriter nor the planner know what to do with
it.
regards, tom lane