fprintf(stderr,"\t -d[a] \t\t dump data as proper insert strings\n");
...
...
@@ -745,6 +752,7 @@ getTableAttrs(TableInfo* tblinfo, int numTables)
charq[MAXQUERYLEN];
inti_attname;
inti_typname;
inti_attlen;
PGresult*res;
intntups;
...
...
@@ -764,7 +772,7 @@ if (g_verbose)
tblinfo[i].relname,
g_comment_end);
sprintf(q,"SELECT a.attnum, a.attname, t.typname 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);
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);