*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.155 2007/09/06 17:31:58 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.156 2007/09/27 17:42:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* (e.g., SELECT * FROM emp, dept)
*
* Since the grammar only accepts bare '*' at top level of SELECT, we
- * need not handle the targetlist==false case here.
+ * need not handle the targetlist==false case here. However, we must
+ * test for it because the grammar currently fails to distinguish
+ * a quoted name "*" from a real asterisk.
*/
- Assert(targetlist);
+ if (!targetlist)
+ elog(ERROR, "invalid use of *");
return ExpandAllTables(pstate);
}