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
edbe00a7
Commit
edbe00a7
authored
Jul 04, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make pgdump_oid a temp table. Rename to pg_dump_oid.
parent
554e56e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+10
-10
No files found.
src/bin/pg_dump/pg_dump.c
View file @
edbe00a7
...
...
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.15
4 2000/07/04 14:25:2
8 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.15
5 2000/07/04 16:57:1
8 momjian Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
...
...
@@ -3599,20 +3599,20 @@ setMaxOid(Archive *fout)
char
sql
[
1024
];
int
pos
;
res
=
PQexec
(
g_conn
,
"CREATE T
ABLE pg
dump_oid (dummy int4)"
);
res
=
PQexec
(
g_conn
,
"CREATE T
EMP TABLE pg_
dump_oid (dummy int4)"
);
if
(
!
res
||
PQresultStatus
(
res
)
!=
PGRES_COMMAND_OK
)
{
fprintf
(
stderr
,
"Can not create pgdump_oid table. "
fprintf
(
stderr
,
"Can not create pg
_
dump_oid table. "
"Explanation from backend: '%s'.
\n
"
,
PQerrorMessage
(
g_conn
));
exit_nicely
(
g_conn
);
}
PQclear
(
res
);
res
=
PQexec
(
g_conn
,
"INSERT INTO pgdump_oid VALUES (0)"
);
res
=
PQexec
(
g_conn
,
"INSERT INTO pg
_
dump_oid VALUES (0)"
);
if
(
!
res
||
PQresultStatus
(
res
)
!=
PGRES_COMMAND_OK
)
{
fprintf
(
stderr
,
"Can not insert into pgdump_oid table. "
fprintf
(
stderr
,
"Can not insert into pg
_
dump_oid table. "
"Explanation from backend: '%s'.
\n
"
,
PQerrorMessage
(
g_conn
));
exit_nicely
(
g_conn
);
}
...
...
@@ -3623,11 +3623,11 @@ setMaxOid(Archive *fout)
exit_nicely
(
g_conn
);
}
PQclear
(
res
);
res
=
PQexec
(
g_conn
,
"DROP TABLE pgdump_oid;"
);
res
=
PQexec
(
g_conn
,
"DROP TABLE pg
_
dump_oid;"
);
if
(
!
res
||
PQresultStatus
(
res
)
!=
PGRES_COMMAND_OK
)
{
fprintf
(
stderr
,
"Can not drop pgdump_oid table. "
fprintf
(
stderr
,
"Can not drop pg
_
dump_oid table. "
"Explanation from backend: '%s'.
\n
"
,
PQerrorMessage
(
g_conn
));
exit_nicely
(
g_conn
);
}
...
...
@@ -3635,11 +3635,11 @@ setMaxOid(Archive *fout)
if
(
g_verbose
)
fprintf
(
stderr
,
"%s maximum system oid is %u %s
\n
"
,
g_comment_start
,
max_oid
,
g_comment_end
);
pos
=
snprintf
(
sql
,
1024
,
"CREATE T
ABLE pg
dump_oid (dummy int4);
\n
"
);
pos
=
pos
+
snprintf
(
sql
+
pos
,
1024
-
pos
,
"COPY pgdump_oid WITH OIDS FROM stdin;
\n
"
);
pos
=
snprintf
(
sql
,
1024
,
"CREATE T
EMP TABLE pg_
dump_oid (dummy int4);
\n
"
);
pos
=
pos
+
snprintf
(
sql
+
pos
,
1024
-
pos
,
"COPY pg
_
dump_oid WITH OIDS FROM stdin;
\n
"
);
pos
=
pos
+
snprintf
(
sql
+
pos
,
1024
-
pos
,
"%-d
\t
0
\n
"
,
max_oid
);
pos
=
pos
+
snprintf
(
sql
+
pos
,
1024
-
pos
,
"
\\
.
\n
"
);
pos
=
pos
+
snprintf
(
sql
+
pos
,
1024
-
pos
,
"DROP TABLE pgdump_oid;
\n
"
);
pos
=
pos
+
snprintf
(
sql
+
pos
,
1024
-
pos
,
"DROP TABLE pg
_
dump_oid;
\n
"
);
ArchiveEntry
(
fout
,
"0"
,
"Max OID"
,
"<Init>"
,
NULL
,
sql
,
""
,
""
,
NULL
,
NULL
);
}
...
...
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