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
cfa3df3d
Commit
cfa3df3d
authored
Mar 06, 2013
by
Kevin Grittner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken pg_dump for 9.0 and 9.1 caused by the MV patch.
Per report and suggestion from Bernd Helmle
parent
cd340ca8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletion
+37
-1
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+37
-1
No files found.
src/bin/pg_dump/pg_dump.c
View file @
cfa3df3d
...
...
@@ -4141,7 +4141,7 @@ getTables(Archive *fout, int *numTables)
* we cannot correctly identify inherited columns, owned sequences, etc.
*/
if
(
fout
->
remoteVersion
>=
90
1
00
)
if
(
fout
->
remoteVersion
>=
90
3
00
)
{
/*
* Left join to pick up dependency info linking sequences to their
...
...
@@ -4177,6 +4177,42 @@ getTables(Archive *fout, int *numTables)
RELKIND_VIEW
,
RELKIND_COMPOSITE_TYPE
,
RELKIND_MATVIEW
,
RELKIND_FOREIGN_TABLE
);
}
else
if
(
fout
->
remoteVersion
>=
90100
)
{
/*
* Left join to pick up dependency info linking sequences to their
* owning column, if any (note this dependency is AUTO as of 8.2)
*/
appendPQExpBuffer
(
query
,
"SELECT c.tableoid, c.oid, c.relname, "
"c.relacl, c.relkind, c.relnamespace, "
"(%s c.relowner) AS rolname, "
"c.relchecks, c.relhastriggers, "
"c.relhasindex, c.relhasrules, c.relhasoids, "
"c.relfrozenxid, tc.oid AS toid, "
"tc.relfrozenxid AS tfrozenxid, "
"c.relpersistence, 't'::bool as isscannable, "
"CASE WHEN c.reloftype <> 0 THEN c.reloftype::pg_catalog.regtype ELSE NULL END AS reloftype, "
"d.refobjid AS owning_tab, "
"d.refobjsubid AS owning_col, "
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = c.reltablespace) AS reltablespace, "
"array_to_string(c.reloptions, ', ') AS reloptions, "
"array_to_string(array(SELECT 'toast.' || x FROM unnest(tc.reloptions) x), ', ') AS toast_reloptions "
"FROM pg_class c "
"LEFT JOIN pg_depend d ON "
"(c.relkind = '%c' AND "
"d.classid = c.tableoid AND d.objid = c.oid AND "
"d.objsubid = 0 AND "
"d.refclassid = c.tableoid AND d.deptype = 'a') "
"LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) "
"WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') "
"ORDER BY c.oid"
,
username_subquery
,
RELKIND_SEQUENCE
,
RELKIND_RELATION
,
RELKIND_SEQUENCE
,
RELKIND_VIEW
,
RELKIND_COMPOSITE_TYPE
,
RELKIND_MATVIEW
,
RELKIND_FOREIGN_TABLE
);
}
else
if
(
fout
->
remoteVersion
>=
90000
)
{
/*
...
...
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