From 0b89d261c7a91ff9ebc6a6b9bd3ee129576bdd9a Mon Sep 17 00:00:00 2001 From: Joe Conway Date: Fri, 2 Jul 2004 18:59:25 +0000 Subject: Andreas Pflug wrote: From an idea of Bruce, the attached patch implements the function pg_tablespace_databases(oid) RETURNS SETOF oid which delivers as set of database oids having objects in the selected tablespace, enabling an admin to examine only the databases affecting the tablespace for objects instead of scanning all of them. initdb forced --- src/backend/commands/tablespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/tablespace.c') diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 847985456f7..875fb1cae8a 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -45,7 +45,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.4 2004/06/25 21:55:53 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.5 2004/07/02 18:59:22 joe Exp $ * *------------------------------------------------------------------------- */ @@ -315,7 +315,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) /* * All seems well, create the symlink */ - linkloc = (char *) palloc(strlen(DataDir) + 16 + 10 + 1); + linkloc = (char *) palloc(strlen(DataDir) + 11 + 10 + 1); sprintf(linkloc, "%s/pg_tblspc/%u", DataDir, tablespaceoid); if (symlink(location, linkloc) < 0) -- cgit v1.2.3