It adds a WITH OIDS option to the copy command, which allows
dumping and loading of oids.
If a copy command tried to load in an oid that is greater than
its current system max oid, the system max oid is incremented. No
checking is done to see if other backends are running and have cached
oids.
pg_dump as its first step when using the -o (oid) option, will
copy in a dummy row to set the system max oid value so as rows are
loaded in, they are certain to be lower than the system oid.
pg_dump now creates indexes at the end to speed loading
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
@ -771,11 +776,11 @@ getTableAttrs(TableInfo* tblinfo, int numTables)
/* we must read the attribute names in attribute number order! */
/* because we will use the attnum to index into the attnames array
later*/
if(g_verbose)
fprintf(stderr,"%s finding the attrs and types for table: %s %s\n",
g_comment_start,
tblinfo[i].relname,
g_comment_end);
if(g_verbose)
fprintf(stderr,"%s finding the attrs and types for table: %s %s\n",
g_comment_start,
tblinfo[i].relname,
g_comment_end);
sprintf(q,"SELECT a.attnum, a.attname, t.typname, a.attlen from pg_attribute a, pg_type t where a.attrelid = '%s'::oid and a.atttypid = t.oid and a.attnum > 0 order by attnum",tblinfo[i].oid);
res=PQexec(g_conn,q);
@ -1356,7 +1361,7 @@ dumpIndices(FILE* fout, IndInfo* indinfo, int numIndices,