Skip to content

Commit edbe00a

Browse files
committed
Make pgdump_oid a temp table. Rename to pg_dump_oid.
1 parent 554e56e commit edbe00a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.154 2000/07/04 14:25:28 momjian Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.155 2000/07/04 16:57:18 momjian Exp $
2626
*
2727
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2828
*
@@ -3599,20 +3599,20 @@ setMaxOid(Archive *fout)
35993599
char sql[1024];
36003600
int pos;
36013601

3602-
res = PQexec(g_conn, "CREATE TABLE pgdump_oid (dummy int4)");
3602+
res = PQexec(g_conn, "CREATE TEMP TABLE pg_dump_oid (dummy int4)");
36033603
if (!res ||
36043604
PQresultStatus(res) != PGRES_COMMAND_OK)
36053605
{
3606-
fprintf(stderr, "Can not create pgdump_oid table. "
3606+
fprintf(stderr, "Can not create pg_dump_oid table. "
36073607
"Explanation from backend: '%s'.\n", PQerrorMessage(g_conn));
36083608
exit_nicely(g_conn);
36093609
}
36103610
PQclear(res);
3611-
res = PQexec(g_conn, "INSERT INTO pgdump_oid VALUES (0)");
3611+
res = PQexec(g_conn, "INSERT INTO pg_dump_oid VALUES (0)");
36123612
if (!res ||
36133613
PQresultStatus(res) != PGRES_COMMAND_OK)
36143614
{
3615-
fprintf(stderr, "Can not insert into pgdump_oid table. "
3615+
fprintf(stderr, "Can not insert into pg_dump_oid table. "
36163616
"Explanation from backend: '%s'.\n", PQerrorMessage(g_conn));
36173617
exit_nicely(g_conn);
36183618
}
@@ -3623,23 +3623,23 @@ setMaxOid(Archive *fout)
36233623
exit_nicely(g_conn);
36243624
}
36253625
PQclear(res);
3626-
res = PQexec(g_conn, "DROP TABLE pgdump_oid;");
3626+
res = PQexec(g_conn, "DROP TABLE pg_dump_oid;");
36273627
if (!res ||
36283628
PQresultStatus(res) != PGRES_COMMAND_OK)
36293629
{
3630-
fprintf(stderr, "Can not drop pgdump_oid table. "
3630+
fprintf(stderr, "Can not drop pg_dump_oid table. "
36313631
"Explanation from backend: '%s'.\n", PQerrorMessage(g_conn));
36323632
exit_nicely(g_conn);
36333633
}
36343634
PQclear(res);
36353635
if (g_verbose)
36363636
fprintf(stderr, "%s maximum system oid is %u %s\n",
36373637
g_comment_start, max_oid, g_comment_end);
3638-
pos = snprintf(sql, 1024, "CREATE TABLE pgdump_oid (dummy int4);\n");
3639-
pos = pos + snprintf(sql+pos, 1024-pos, "COPY pgdump_oid WITH OIDS FROM stdin;\n");
3638+
pos = snprintf(sql, 1024, "CREATE TEMP TABLE pg_dump_oid (dummy int4);\n");
3639+
pos = pos + snprintf(sql+pos, 1024-pos, "COPY pg_dump_oid WITH OIDS FROM stdin;\n");
36403640
pos = pos + snprintf(sql+pos, 1024-pos, "%-d\t0\n", max_oid);
36413641
pos = pos + snprintf(sql+pos, 1024-pos, "\\.\n");
3642-
pos = pos + snprintf(sql+pos, 1024-pos, "DROP TABLE pgdump_oid;\n");
3642+
pos = pos + snprintf(sql+pos, 1024-pos, "DROP TABLE pg_dump_oid;\n");
36433643

36443644
ArchiveEntry(fout, "0", "Max OID", "<Init>", NULL, sql, "","", NULL, NULL);
36453645
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy