diff options
author | Bruce Momjian <bruce@momjian.us> | 2013-05-29 16:58:43 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2013-05-29 16:58:43 -0400 |
commit | 9af4159fce6654aa0e081b00d02bca40b978745c (patch) | |
tree | 3aa507fc6cc67ed3d9f6ceec4d65d1e56cc08e1a /contrib/pg_upgrade/info.c | |
parent | 07ab261ef3a9575a4a2bd3045b222d7b3dee2c46 (diff) | |
download | postgresql-9af4159fce6654aa0e081b00d02bca40b978745c.tar.gz postgresql-9af4159fce6654aa0e081b00d02bca40b978745c.zip |
pgindent run for release 9.3
This is the first run of the Perl-based pgindent script. Also update
pgindent instructions.
Diffstat (limited to 'contrib/pg_upgrade/info.c')
-rw-r--r-- | contrib/pg_upgrade/info.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/contrib/pg_upgrade/info.c b/contrib/pg_upgrade/info.c index c5c36981eab..72b515d12e0 100644 --- a/contrib/pg_upgrade/info.c +++ b/contrib/pg_upgrade/info.c @@ -60,10 +60,9 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db, * table names change during ALTER TABLE ALTER COLUMN SET TYPE. In >= * 9.0, TOAST relation names always use heap table oids, hence we * cannot check relation names when upgrading from pre-9.0. Clusters - * upgraded to 9.0 will get matching TOAST names. - * If index names don't match primary key constraint names, this will - * fail because pg_dump dumps constraint names and pg_upgrade checks - * index names. + * upgraded to 9.0 will get matching TOAST names. If index names don't + * match primary key constraint names, this will fail because pg_dump + * dumps constraint names and pg_upgrade checks index names. */ if (strcmp(old_rel->nspname, new_rel->nspname) != 0 || ((GET_MAJOR_VERSION(old_cluster.major_version) >= 900 || @@ -79,7 +78,10 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db, num_maps++; } - /* Do this check after the loop so hopefully we will produce a clearer error above */ + /* + * Do this check after the loop so hopefully we will produce a clearer + * error above + */ if (old_db->rel_arr.nrels != new_db->rel_arr.nrels) pg_log(PG_FATAL, "old and new databases \"%s\" have a different number of relations\n", old_db->db_name); @@ -285,8 +287,11 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo) "LEFT OUTER JOIN pg_catalog.pg_index i " " ON c.oid = i.indexrelid " "WHERE relkind IN ('r', 'm', 'i'%s) AND " - /* pg_dump only dumps valid indexes; testing indisready is - * necessary in 9.2, and harmless in earlier/later versions. */ + + /* + * pg_dump only dumps valid indexes; testing indisready is necessary in + * 9.2, and harmless in earlier/later versions. + */ " i.indisvalid IS DISTINCT FROM false AND " " i.indisready IS DISTINCT FROM false AND " /* exclude possible orphaned temp tables */ @@ -309,8 +314,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo) PQclear(executeQueryOrDie(conn, "%s", query)); /* - * Get TOAST tables and indexes; we have to gather the TOAST tables in - * later steps because we can't schema-qualify TOAST tables. + * Get TOAST tables and indexes; we have to gather the TOAST tables in + * later steps because we can't schema-qualify TOAST tables. */ PQclear(executeQueryOrDie(conn, "INSERT INTO info_rels " @@ -335,8 +340,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo) /* we preserve pg_class.oid so we sort by it to match old/new */ "ORDER BY 1;", /* 9.2 removed the spclocation column */ - (GET_MAJOR_VERSION(cluster->major_version) <= 901) ? - "t.spclocation" : "pg_catalog.pg_tablespace_location(t.oid) AS spclocation"); + (GET_MAJOR_VERSION(cluster->major_version) <= 901) ? + "t.spclocation" : "pg_catalog.pg_tablespace_location(t.oid) AS spclocation"); res = executeQueryOrDie(conn, "%s", query); @@ -437,5 +442,5 @@ print_rel_infos(RelInfoArr *rel_arr) for (relnum = 0; relnum < rel_arr->nrels; relnum++) pg_log(PG_VERBOSE, "relname: %s.%s: reloid: %u reltblspace: %s\n", rel_arr->rels[relnum].nspname, rel_arr->rels[relnum].relname, - rel_arr->rels[relnum].reloid, rel_arr->rels[relnum].tablespace); + rel_arr->rels[relnum].reloid, rel_arr->rels[relnum].tablespace); } |