summaryrefslogtreecommitdiff
path: root/src/bin/psql
diff options
context:
space:
mode:
authorPeter Eisentraut2013-11-10 14:20:52 +0000
committerPeter Eisentraut2013-11-10 19:48:29 +0000
commit001e114b8d59f4eaf2a314a2bc5e57078afdf82f (patch)
tree606fa622be346ef917886a29aea7e17383e00d31 /src/bin/psql
parentdca09ac53329e92d73f45674957c26d3d7ae5117 (diff)
Fix whitespace issues found by git diff --check, add gitattributes
Set per file type attributes in .gitattributes to fine-tune whitespace checks. With the associated cleanups, the tree is now clean for git
Diffstat (limited to 'src/bin/psql')
-rw-r--r--src/bin/psql/command.c21
-rw-r--r--src/bin/psql/describe.c6
-rw-r--r--src/bin/psql/tab-complete.c2
3 files changed, 15 insertions, 14 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 0b7b8d45b8b..d0e25a9e0a4 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -1041,20 +1041,21 @@ exec_command(const char *cmd,
if (!opt0)
{
- size_t i;
- /* list all variables */
- static const char *const my_list[] = {
+ /* list all variables */
+
+ int i;
+ static const char *const my_list[] = {
"border", "columns", "expanded", "fieldsep",
"footer", "format", "linestyle", "null",
"numericlocale", "pager", "recordsep",
"tableattr", "title", "tuples_only",
- NULL };
- for (i = 0; my_list[i] != NULL; i++) {
- printPsetInfo(my_list[i], &pset.popt);
- }
+ NULL
+ };
- success = true;
+ for (i = 0; my_list[i] != NULL; i++)
+ printPsetInfo(my_list[i], &pset.popt);
+ success = true;
}
else
success = do_pset(opt0, opt1, &pset.popt, pset.quiet);
@@ -2432,8 +2433,8 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
return false;
}
- if (!quiet)
- printPsetInfo(param, &pset.popt);
+ if (!quiet)
+ printPsetInfo(param, &pset.popt);
return true;
}
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 76953f21a09..25fec2b5863 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2311,13 +2311,13 @@ describeOneTableDetails(const char *schemaname,
}
if ((tableinfo.relkind == 'r' || tableinfo.relkind == 'm') &&
- tableinfo.relreplident != 'd' && tableinfo.relreplident != 'i')
+ tableinfo.relreplident != 'd' && tableinfo.relreplident != 'i')
{
const char *s = _("Replica Identity");
printfPQExpBuffer(&buf, "%s: %s",
- s,
- tableinfo.relreplident == 'n' ? "NOTHING" : "FULL");
+ s,
+ tableinfo.relreplident == 'n' ? "NOTHING" : "FULL");
printTableAddFooter(&cont, buf.data);
}
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 5287d1c7c6c..f6c1aaf4532 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1584,7 +1584,7 @@ psql_completion(char *text, int start, int end)
else if (pg_strcasecmp(prev4_wd, "REPLICA") == 0 &&
pg_strcasecmp(prev3_wd, "IDENTITY") == 0 &&
pg_strcasecmp(prev2_wd, "USING") == 0 &&
- pg_strcasecmp(prev_wd, "INDEX") == 0)
+ pg_strcasecmp(prev_wd, "INDEX") == 0)
{
completion_info_charp = prev5_wd;
COMPLETE_WITH_QUERY(Query_for_index_of_table);