Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ba6b87f3
Commit
ba6b87f3
authored
Jun 21, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pg_dump and pg_dumpall for new names of built-in tablespaces,
per Chris K-L.
parent
f5f448fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+2
-2
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_dumpall.c
+8
-8
No files found.
src/bin/pg_dump/pg_dump.c
View file @
ba6b87f3
...
...
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.37
5 2004/06/18 06:14:00
tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.37
6 2004/06/21 13:36:41
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1252,7 +1252,7 @@ dumpDatabase(Archive *AH)
appendPQExpBuffer
(
creaQry
,
" ENCODING = "
);
appendStringLiteral
(
creaQry
,
encoding
,
true
);
}
if
(
strlen
(
tablespace
)
>
0
&&
strcmp
(
tablespace
,
"default"
)
!=
0
)
if
(
strlen
(
tablespace
)
>
0
&&
strcmp
(
tablespace
,
"
pg_
default"
)
!=
0
)
{
appendPQExpBuffer
(
creaQry
,
" TABLESPACE = %s"
,
fmtId
(
tablespace
));
}
...
...
src/bin/pg_dump/pg_dumpall.c
View file @
ba6b87f3
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.4
2 2004/06/18 06:14:00
tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.4
3 2004/06/21 13:36:42
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -426,14 +426,14 @@ dumpTablespaces(PGconn *conn)
printf
(
"--
\n
-- Tablespaces
\n
--
\n\n
"
);
/*
* Get all tablespaces except
for the system default and global
*
tablespaces
* Get all tablespaces except
built-in ones (which we assume are named
*
pg_xxx)
*/
res
=
executeQuery
(
conn
,
"SELECT spcname, "
"pg_catalog.pg_get_userbyid(spcowner) AS spcowner, "
"spclocation, spcacl "
"FROM pg_catalog.pg_tablespace "
"WHERE spcname NOT
IN ('default', 'global')
"
);
"WHERE spcname NOT
LIKE 'pg
\\
_%'
"
);
for
(
i
=
0
;
i
<
PQntuples
(
res
);
i
++
)
{
...
...
@@ -511,7 +511,7 @@ dumpCreateDB(PGconn *conn)
"coalesce(usename, (select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), "
"datistemplate, datacl, "
"'default' AS dattablespace "
"'
pg_
default' AS dattablespace "
"FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) "
"WHERE datallowconn ORDER BY 1"
);
else
if
(
server_version
>=
70100
)
...
...
@@ -522,7 +522,7 @@ dumpCreateDB(PGconn *conn)
"(select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), "
"datistemplate, '' as datacl, "
"'default' AS dattablespace "
"'
pg_
default' AS dattablespace "
"FROM pg_database d "
"WHERE datallowconn ORDER BY 1"
);
else
...
...
@@ -537,7 +537,7 @@ dumpCreateDB(PGconn *conn)
"pg_encoding_to_char(d.encoding), "
"'f' as datistemplate, "
"'' as datacl, "
"'default' AS dattablespace "
"'
pg_
default' AS dattablespace "
"FROM pg_database d "
"ORDER BY 1"
);
}
...
...
@@ -576,7 +576,7 @@ dumpCreateDB(PGconn *conn)
appendStringLiteral
(
buf
,
dbencoding
,
true
);
/* Output tablespace if it isn't default */
if
(
strcmp
(
dbtablespace
,
"default"
)
!=
0
)
if
(
strcmp
(
dbtablespace
,
"
pg_
default"
)
!=
0
)
appendPQExpBuffer
(
buf
,
" TABLESPACE = %s"
,
fmtId
(
dbtablespace
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment