Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitedbe00a

Browse files
committed
Make pgdump_oid a temp table. Rename to pg_dump_oid.
1 parent554e56e commitedbe00a

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/0414:25:28 momjian Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.155 2000/07/0416: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
charsql[1024];
36003600
intpos;
36013601

3602-
res=PQexec(g_conn,"CREATE TABLEpgdump_oid (dummy int4)");
3602+
res=PQexec(g_conn,"CREATETEMPTABLEpg_dump_oid (dummy int4)");
36033603
if (!res||
36043604
PQresultStatus(res)!=PGRES_COMMAND_OK)
36053605
{
3606-
fprintf(stderr,"Can not createpgdump_oid table. "
3606+
fprintf(stderr,"Can not createpg_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 INTOpgdump_oid VALUES (0)");
3611+
res=PQexec(g_conn,"INSERT INTOpg_dump_oid VALUES (0)");
36123612
if (!res||
36133613
PQresultStatus(res)!=PGRES_COMMAND_OK)
36143614
{
3615-
fprintf(stderr,"Can not insert intopgdump_oid table. "
3615+
fprintf(stderr,"Can not insert intopg_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 TABLEpgdump_oid;");
3626+
res=PQexec(g_conn,"DROP TABLEpg_dump_oid;");
36273627
if (!res||
36283628
PQresultStatus(res)!=PGRES_COMMAND_OK)
36293629
{
3630-
fprintf(stderr,"Can not droppgdump_oid table. "
3630+
fprintf(stderr,"Can not droppg_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 TABLEpgdump_oid (dummy int4);\n");
3639-
pos=pos+snprintf(sql+pos,1024-pos,"COPYpgdump_oid WITH OIDS FROM stdin;\n");
3638+
pos=snprintf(sql,1024,"CREATETEMPTABLEpg_dump_oid (dummy int4);\n");
3639+
pos=pos+snprintf(sql+pos,1024-pos,"COPYpg_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 TABLEpgdump_oid;\n");
3642+
pos=pos+snprintf(sql+pos,1024-pos,"DROP TABLEpg_dump_oid;\n");
36433643

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp