From 830c168e5ce40112433fcc4784415a1abacb3e57 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 17 Oct 2004 20:47:21 +0000 Subject: Give a more user-friendly error message in situation where CREATE DATABASE specifies a new default tablespace and the template database already has some tables in that tablespace. There isn't any way to solve this fully without modifying the clone database's pg_class contents, so for now the best we can do is issue a better error message. --- src/include/commands/tablespace.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h index 7e99c7e6b7..58ad23ae16 100644 --- a/src/include/commands/tablespace.h +++ b/src/include/commands/tablespace.h @@ -7,7 +7,7 @@ * 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.5 2004/08/30 02:54:40 momjian Exp $ + * $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.6 2004/10/17 20:47:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -42,6 +42,8 @@ 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 bool directory_is_empty(const char *path); + extern void tblspc_redo(XLogRecPtr lsn, XLogRecord *rptr); extern void tblspc_undo(XLogRecPtr lsn, XLogRecord *rptr); extern void tblspc_desc(char *buf, uint8 xl_info, char *rec); -- cgit v1.2.3