1
0
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:
Bruce Momjian
2007-01-25 04:35:11 +00:00
parent 5af6b2abe9
commit 148ea5cbea
10 changed files with 272 additions and 16 deletions

View File

@ -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 */
}