mirror of
https://github.com/postgres/postgres.git
synced 2025-07-23 03:21:12 +03:00
Fix for SELECT INTO ... GROUP/ORDER BY where table already exists unlink error.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.8 1996/11/05 09:53:01 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.9 1997/01/01 06:01:03 momjian Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@ -495,6 +495,10 @@ heap_open(Oid relationId)
|
||||
IncrHeapAccessStat(global_open);
|
||||
|
||||
r = (Relation) RelationIdGetRelation(relationId);
|
||||
|
||||
if(RelationIsValid(r) && r->rd_istemp) {
|
||||
r->rd_tmpunlinked = FALSE; /* now we can unlink it */
|
||||
}
|
||||
|
||||
if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX) {
|
||||
elog(WARN, "%s is an index relation", r->rd_rel->relname.data);
|
||||
@ -524,6 +528,10 @@ heap_openr(char *relationName)
|
||||
|
||||
r = RelationNameGetRelation(relationName);
|
||||
|
||||
if(RelationIsValid(r) && r->rd_istemp) {
|
||||
r->rd_tmpunlinked = FALSE; /* now we can unlink it */
|
||||
}
|
||||
|
||||
if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX) {
|
||||
elog(WARN, "%s is an index relation", r->rd_rel->relname.data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user