mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
Add GUC temp_tablespaces to provide a default location for temporary
objects. Jaime Casanova
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.153 2007/01/20 23:13:01 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.154 2007/01/25 04:35:10 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -209,7 +209,13 @@ DefineIndex(RangeVar *heapRelation,
|
||||
}
|
||||
else
|
||||
{
|
||||
tablespaceId = GetDefaultTablespace();
|
||||
/*
|
||||
* if the target table is temporary then use a temp_tablespace
|
||||
*/
|
||||
if (!rel->rd_istemp)
|
||||
tablespaceId = GetDefaultTablespace();
|
||||
else
|
||||
tablespaceId = GetTempTablespace();
|
||||
/* note InvalidOid is OK in this case */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user