Commit 2056f8a7 authored by Bruce Momjian's avatar Bruce Momjian

pgindent C file, per patch request.

parent 3bf080da
...@@ -96,8 +96,10 @@ init_table_info(PGresult *res, int row, db_info * dbi) ...@@ -96,8 +96,10 @@ init_table_info(PGresult *res, int row, db_info * dbi)
return NULL; return NULL;
} }
/* Put both the schema and table name in quotes so that /*
we can work with mixed case table names */ * Put both the schema and table name in quotes so that we can work
* with mixed case table names
*/
strcpy(new_tbl->table_name, "\""); strcpy(new_tbl->table_name, "\"");
strcat(new_tbl->table_name, new_tbl->schema_name); strcat(new_tbl->table_name, new_tbl->schema_name);
strcat(new_tbl->table_name, "\".\""); strcat(new_tbl->table_name, "\".\"");
...@@ -1084,8 +1086,11 @@ main(int argc, char *argv[]) ...@@ -1084,8 +1086,11 @@ main(int argc, char *argv[])
*/ */
if ((tbl->curr_vacuum_count - tbl->CountAtLastVacuum) >= tbl->vacuum_threshold) if ((tbl->curr_vacuum_count - tbl->CountAtLastVacuum) >= tbl->vacuum_threshold)
{ {
/* if relisshared = t and database != template1 then only do an analyze */ /*
if((tbl->relisshared > 0) && (strcmp("template1",dbs->dbname))) * if relisshared = t and database !=
* template1 then only do an analyze
*/
if ((tbl->relisshared > 0) && (strcmp("template1", dbs->dbname)))
snprintf(buf, sizeof(buf), "ANALYZE %s", tbl->table_name); snprintf(buf, sizeof(buf), "ANALYZE %s", tbl->table_name);
else else
snprintf(buf, sizeof(buf), "VACUUM ANALYZE %s", tbl->table_name); snprintf(buf, sizeof(buf), "VACUUM ANALYZE %s", tbl->table_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment