提交 32e192d7 编写于 作者: T Tom Lane

Repair coredump seen when a view refers to an inheritance group

(SELECT FROM table*).  Cause was reference to 'eref' field of an RTE,
which is null in an RTE loaded from a stored rule parsetree.  There
wasn't any good reason to be touching the refname anyway...
上级 25442d8d
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.48 2000/04/12 17:15:23 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.49 2000/04/18 05:52:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -471,13 +471,8 @@ new_rangetable_entry(Oid new_relid, RangeTblEntry *old_entry)
{
RangeTblEntry *new_entry = copyObject(old_entry);
/* ??? someone tell me what the following is doing! - ay 11/94 */
if (!strcmp(new_entry->eref->relname, "*CURRENT*") ||
!strcmp(new_entry->eref->relname, "*NEW*"))
new_entry->ref->relname = get_rel_name(new_relid);
else
new_entry->relname = get_rel_name(new_relid);
/* Replace relation real name and OID, but not the reference name */
new_entry->relname = get_rel_name(new_relid);
new_entry->relid = new_relid;
return new_entry;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册