mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
probably should have been to begin with; this is to cover cases like needing to recreate the per-db directory during WAL replay. Also, fix heap_create to force pg_class.reltablespace to be zero instead of the database's default tablespace; this makes the world safe for CREATE DATABASE to handle all tables in the default tablespace alike, as per previous discussion. And force pg_class.reltablespace to zero when creating a relation without physical storage (eg, a view); this avoids possibly having dangling references in this column after a subsequent DROP TABLESPACE.
33 lines
1004 B
C
33 lines
1004 B
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* tablespace.h
|
|
* prototypes for tablespace.c.
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.3 2004/07/11 19:52:52 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef TABLESPACE_H
|
|
#define TABLESPACE_H
|
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
extern void CreateTableSpace(CreateTableSpaceStmt *stmt);
|
|
|
|
extern void DropTableSpace(DropTableSpaceStmt *stmt);
|
|
|
|
extern void TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo);
|
|
|
|
extern Oid get_tablespace_oid(const char *tablespacename);
|
|
|
|
extern char *get_tablespace_name(Oid spc_oid);
|
|
|
|
extern void RenameTableSpace(const char *oldname, const char *newname);
|
|
extern void AlterTableSpaceOwner(const char *name, AclId newOwnerSysId);
|
|
|
|
#endif /* TABLESPACE_H */
|