Commit 32e192d7 authored by Tom Lane's avatar 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...
parent 25442d8d
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -471,13 +471,8 @@ new_rangetable_entry(Oid new_relid, RangeTblEntry *old_entry)
{ {
RangeTblEntry *new_entry = copyObject(old_entry); RangeTblEntry *new_entry = copyObject(old_entry);
/* ??? someone tell me what the following is doing! - ay 11/94 */ /* Replace relation real name and OID, but not the reference name */
if (!strcmp(new_entry->eref->relname, "*CURRENT*") || new_entry->relname = get_rel_name(new_relid);
!strcmp(new_entry->eref->relname, "*NEW*"))
new_entry->ref->relname = get_rel_name(new_relid);
else
new_entry->relname = get_rel_name(new_relid);
new_entry->relid = new_relid; new_entry->relid = new_relid;
return new_entry; return new_entry;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment