mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
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.
This commit is contained in:
@ -45,7 +45,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.11 2004/08/30 02:54:38 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.12 2004/10/17 20:47:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -75,7 +75,6 @@
|
||||
|
||||
static bool remove_tablespace_directories(Oid tablespaceoid, bool redo);
|
||||
static void set_short_version(const char *path);
|
||||
static bool directory_is_empty(const char *path);
|
||||
|
||||
|
||||
/*
|
||||
@ -680,8 +679,10 @@ set_short_version(const char *path)
|
||||
|
||||
/*
|
||||
* Check if a directory is empty.
|
||||
*
|
||||
* This probably belongs somewhere else, but not sure where...
|
||||
*/
|
||||
static bool
|
||||
bool
|
||||
directory_is_empty(const char *path)
|
||||
{
|
||||
DIR *dirdesc;
|
||||
|
Reference in New Issue
Block a user