1212 *by PostgreSQL
1313 *
1414 * 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 $
1616 *
1717 *-------------------------------------------------------------------------
1818 */
@@ -7157,8 +7157,12 @@ setMaxOid(Archive *fout)
71577157Oid max_oid ;
71587158char sql [1024 ];
71597159
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)" );
71627166res = PQexec (g_conn ,"INSERT INTO pgdump_oid VALUES (0)" );
71637167check_sql_result (res ,g_conn ,"INSERT INTO pgdump_oid VALUES (0)" ,
71647168PGRES_COMMAND_OK );
@@ -7173,7 +7177,7 @@ setMaxOid(Archive *fout)
71737177if (g_verbose )
71747178write_msg (NULL ,"maximum system OID is %u\n" ,max_oid );
71757179snprintf (sql ,sizeof (sql ),
7176- "CREATE TEMPORARY TABLE pgdump_oid (dummy integer);\n"
7180+ "CREATE TEMPORARY TABLE pgdump_oid (dummy integer) WITH OIDS ;\n"
71777181"COPY pgdump_oid WITH OIDS FROM stdin;\n"
71787182"%u\t0\n"
71797183"\\.\n"