File tree 1 file changed +8
-4
lines changed 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 12
12
* by PostgreSQL
13
13
*
14
14
* IDENTIFICATION
15
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.397 2004/12/31 22:03:08 pgsql Exp $
15
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.398 2005/01/04 22:27:46 tgl Exp $
16
16
*
17
17
*-------------------------------------------------------------------------
18
18
*/
@@ -7157,8 +7157,12 @@ setMaxOid(Archive *fout)
7157
7157
Oid max_oid ;
7158
7158
char sql [1024 ];
7159
7159
7160
- do_sql_command (g_conn ,
7161
- "CREATE TEMPORARY TABLE pgdump_oid (dummy integer)" );
7160
+ if (fout -> remoteVersion >= 70200 )
7161
+ do_sql_command (g_conn ,
7162
+ "CREATE TEMPORARY TABLE pgdump_oid (dummy integer) WITH OIDS" );
7163
+ else
7164
+ do_sql_command (g_conn ,
7165
+ "CREATE TEMPORARY TABLE pgdump_oid (dummy integer)" );
7162
7166
res = PQexec (g_conn , "INSERT INTO pgdump_oid VALUES (0)" );
7163
7167
check_sql_result (res , g_conn , "INSERT INTO pgdump_oid VALUES (0)" ,
7164
7168
PGRES_COMMAND_OK );
@@ -7173,7 +7177,7 @@ setMaxOid(Archive *fout)
7173
7177
if (g_verbose )
7174
7178
write_msg (NULL , "maximum system OID is %u\n" , max_oid );
7175
7179
snprintf (sql , sizeof (sql ),
7176
- "CREATE TEMPORARY TABLE pgdump_oid (dummy integer);\n"
7180
+ "CREATE TEMPORARY TABLE pgdump_oid (dummy integer) WITH OIDS ;\n"
7177
7181
"COPY pgdump_oid WITH OIDS FROM stdin;\n"
7178
7182
"%u\t0\n"
7179
7183
"\\.\n"
You can’t perform that action at this time.
0 commit comments