diff options
Diffstat (limited to 'src/bin/psql/startup.c')
-rw-r--r-- | src/bin/psql/startup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index de1c48a509..7f7f407af2 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -145,6 +145,8 @@ main(int argc, char *argv[]) pset.popt.topt.format = PRINT_ALIGNED; pset.popt.topt.border = 1; pset.popt.topt.pager = 1; + pset.popt.topt.start_table = true; + pset.popt.topt.stop_table = true; pset.popt.default_footer = true; pset.notty = (!isatty(fileno(stdin)) || !isatty(fileno(stdout))); @@ -799,6 +801,12 @@ singlestep_hook(const char *newval) } static void +fetch_count_hook(const char *newval) +{ + pset.fetch_count = ParseVariableNum(newval, -1, -1, false); +} + +static void echo_hook(const char *newval) { if (newval == NULL) @@ -899,6 +907,7 @@ EstablishVariableSpace(void) SetVariableAssignHook(pset.vars, "QUIET", quiet_hook); SetVariableAssignHook(pset.vars, "SINGLELINE", singleline_hook); SetVariableAssignHook(pset.vars, "SINGLESTEP", singlestep_hook); + SetVariableAssignHook(pset.vars, "FETCH_COUNT", fetch_count_hook); SetVariableAssignHook(pset.vars, "ECHO", echo_hook); SetVariableAssignHook(pset.vars, "ECHO_HIDDEN", echo_hidden_hook); SetVariableAssignHook(pset.vars, "ON_ERROR_ROLLBACK", on_error_rollback_hook); |