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
fea43768
Commit
fea43768
authored
Nov 18, 2013
by
Heikki Linnakangas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spell SQL keywords in uppercase in pg_dump's query.
The server won't care, but let's be consistent. David Rowley.
parent
32ceba3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+24
-24
No files found.
src/bin/pg_dump/pg_dump.c
View file @
fea43768
...
@@ -1920,32 +1920,32 @@ buildMatViewRefreshDependencies(Archive *fout)
...
@@ -1920,32 +1920,32 @@ buildMatViewRefreshDependencies(Archive *fout)
query
=
createPQExpBuffer
();
query
=
createPQExpBuffer
();
appendPQExpBufferStr
(
query
,
"
with recursive w as
"
appendPQExpBufferStr
(
query
,
"
WITH RECURSIVE w AS
"
"( "
"( "
"
select d1.objid, d2.refobjid, c2.relkind as
refrelkind "
"
SELECT d1.objid, d2.refobjid, c2.relkind AS
refrelkind "
"
from
pg_depend d1 "
"
FROM
pg_depend d1 "
"
join pg_class c1 on
c1.oid = d1.objid "
"
JOIN pg_class c1 ON
c1.oid = d1.objid "
"
and
c1.relkind = 'm' "
"
AND
c1.relkind = 'm' "
"
join pg_rewrite r1 on
r1.ev_class = d1.objid "
"
JOIN pg_rewrite r1 ON
r1.ev_class = d1.objid "
"
join pg_depend d2 on
d2.classid = 'pg_rewrite'::regclass "
"
JOIN pg_depend d2 ON
d2.classid = 'pg_rewrite'::regclass "
"
and
d2.objid = r1.oid "
"
AND
d2.objid = r1.oid "
"
and
d2.refobjid <> d1.objid "
"
AND
d2.refobjid <> d1.objid "
"
join pg_class c2 on
c2.oid = d2.refobjid "
"
JOIN pg_class c2 ON
c2.oid = d2.refobjid "
"
and c2.relkind in
('m','v') "
"
AND c2.relkind IN
('m','v') "
"
where
d1.classid = 'pg_class'::regclass "
"
WHERE
d1.classid = 'pg_class'::regclass "
"
union
"
"
UNION
"
"
select
w.objid, d3.refobjid, c3.relkind "
"
SELECT
w.objid, d3.refobjid, c3.relkind "
"
from
w "
"
FROM
w "
"
join pg_rewrite r3 on
r3.ev_class = w.refobjid "
"
JOIN pg_rewrite r3 ON
r3.ev_class = w.refobjid "
"
join pg_depend d3 on
d3.classid = 'pg_rewrite'::regclass "
"
JOIN pg_depend d3 ON
d3.classid = 'pg_rewrite'::regclass "
"
and
d3.objid = r3.oid "
"
AND
d3.objid = r3.oid "
"
and
d3.refobjid <> w.refobjid "
"
AND
d3.refobjid <> w.refobjid "
"
join pg_class c3 on
c3.oid = d3.refobjid "
"
JOIN pg_class c3 ON
c3.oid = d3.refobjid "
"
and c3.relkind in
('m','v') "
"
AND c3.relkind IN
('m','v') "
") "
") "
"
select 'pg_class'::regclass::oid as
classid, objid, refobjid "
"
SELECT 'pg_class'::regclass::oid AS
classid, objid, refobjid "
"
from
w "
"
FROM
w "
"
where
refrelkind = 'm'"
);
"
WHERE
refrelkind = 'm'"
);
res
=
ExecuteSqlQuery
(
fout
,
query
->
data
,
PGRES_TUPLES_OK
);
res
=
ExecuteSqlQuery
(
fout
,
query
->
data
,
PGRES_TUPLES_OK
);
...
...
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