Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 32e192d

Browse files
committed
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...
1 parent 25442d8 commit 32e192d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/backend/optimizer/prep/prepunion.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.48 2000/04/12 17:15:23 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.49 2000/04/18 05:52:35 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -471,13 +471,8 @@ new_rangetable_entry(Oid new_relid, RangeTblEntry *old_entry)
471471
{
472472
RangeTblEntry *new_entry = copyObject(old_entry);
473473

474-
/* ??? someone tell me what the following is doing! - ay 11/94 */
475-
if (!strcmp(new_entry->eref->relname, "*CURRENT*") ||
476-
!strcmp(new_entry->eref->relname, "*NEW*"))
477-
new_entry->ref->relname = get_rel_name(new_relid);
478-
else
479-
new_entry->relname = get_rel_name(new_relid);
480-
474+
/* Replace relation real name and OID, but not the reference name */
475+
new_entry->relname = get_rel_name(new_relid);
481476
new_entry->relid = new_relid;
482477
return new_entry;
483478
}

0 commit comments

Comments
 (0)