review: psql and pset without any arguments
От | Pavel Stehule |
---|---|
Тема | review: psql and pset without any arguments |
Дата | |
Msg-id | CAFj8pRADhiMiy0rWXQ1Sg4SPDHz4UE98-AuZ3DP+Hkk2uX9B_Q@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: review: psql and pset without any arguments
Re: review: psql and pset without any arguments |
Список | pgsql-hackers |
Hello
* patch is cleanly patchable and compilation is without warningsIssues:
1) it doesn't show linestyle when is default
I looked there and it is probably a small different issue - this value is initialized as NULL as default. But I dislike a empty output in this case:
else if (strcmp(param, "linestyle") == 0)
{
if (!popt->topt.line_style)
;
else
printf(_("Line style is %s.\n"),
get_line_style(&popt->topt)->name);
}
else if (strcmp(param, "linestyle") == 0)
{
if (!popt->topt.line_style)
;
else
printf(_("Line style is %s.\n"),
get_line_style(&popt->topt)->name);
}
I propose a verbose result instead nothing:
else if (strcmp(param, "linestyle") == 0)
{
if (!popt->topt.line_style)
printf(_("Line style is unset.\n")) ;
else
printf(_("Line style is %s.\n"),
get_line_style(&popt->topt)->name);
}
printf(_("Line style is %s.\n"),
get_line_style(&popt->topt)->name);
}
postgres=# \pset
Output format (format) is aligned.
Border style (border) is 1.
Expanded display (expanded) is off.
Null display (null) is "".
Field separator (fieldsep) is "|".
Tuples only (tuples_only) is off.
Title (title) is unset.
Table attributes (tableattr) unset.
Pager (pager) is used for long output.
Record separator (recordsep) is <newline>.
This expanded output should be used only for this resume (not when a option was changed or individual ask on option value)
Regards
Pavel Stehule
В списке pgsql-hackers по дате отправления: