Обсуждение: Updated backslash consistency patch

Поиск
Список
Период
Сортировка

Updated backslash consistency patch

От
Greg Sabino Mullane
Дата:
Here's an updated version of the psql backslash patch that should
apply cleanly to the current HEAD. To recap, this makes all the \dX
commands (most importantly to most: \df) work like \dt does, in that it
requires a \dXS to see system items. See the archives for much more
discussion on the issue.

--
Greg Sabino Mullane

Вложения

Re: Updated backslash consistency patch

От
Alvaro Herrera
Дата:
Greg Sabino Mullane wrote:
> Here's an updated version of the psql backslash patch that should
> apply cleanly to the current HEAD. To recap, this makes all the \dX
> commands (most importantly to most: \df) work like \dt does, in that it
> requires a \dXS to see system items. See the archives for much more
> discussion on the issue.

Some comments:

1. toast objects no longer show up anywhere; they are removed in the
non-system case by excluding pg_toast% schemas, and are removed in the
system case by requiring nspname = 'pg_catalog'

2. the help.c patch no longer applies due to the \dC patch recently
applied

3. the help.c patch breaks alignment of the help output.  I think the
best way to fix it would be to change [PATTERN] into something shorter
like [PAT] and add a mention to that in the first line, something like

>       fprintf(output, _("Informational\n"));
> !      fprintf(output, _("  Modifiers: S = show system objects  + = Additional detail\n"));       fprintf(output, _("
           [PAT] means an optional glob-like pattern\n");
 

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Updated backslash consistency patch

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> 3. the help.c patch breaks alignment of the help output.  I think the
> best way to fix it would be to change [PATTERN] into something shorter
> like [PAT] and add a mention to that in the first line, something like

I'd rather stick with [PATTERN].  Can't we just add more spaces to keep
all the descriptions aligned?
        regards, tom lane


Re: Updated backslash consistency patch

От
Alvaro Herrera
Дата:
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > 3. the help.c patch breaks alignment of the help output.  I think the
> > best way to fix it would be to change [PATTERN] into something shorter
> > like [PAT] and add a mention to that in the first line, something like
> 
> I'd rather stick with [PATTERN].  Can't we just add more spaces to keep
> all the descriptions aligned?

Yes, but it shortens the available space for all the texts (which could
cause some of them to become two lines, but I didn't check) and it means
the translations have to be updated.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


Re: Updated backslash consistency patch

От
Alvaro Herrera
Дата:
Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:
> > > 3. the help.c patch breaks alignment of the help output.  I think the
> > > best way to fix it would be to change [PATTERN] into something shorter
> > > like [PAT] and add a mention to that in the first line, something like
> > 
> > I'd rather stick with [PATTERN].  Can't we just add more spaces to keep
> > all the descriptions aligned?
> 
> Yes, but it shortens the available space for all the texts (which could
> cause some of them to become two lines, but I didn't check) and it means
> the translations have to be updated.

Forgot to add: ... but I don't really care all that much, as long as
alignment is OK as a whole.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Updated backslash consistency patch

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> I'd rather stick with [PATTERN].  Can't we just add more spaces to keep
>> all the descriptions aligned?

> Yes, but it shortens the available space for all the texts (which could
> cause some of them to become two lines, but I didn't check) and it means
> the translations have to be updated.

The translations will get broken either way, so that doesn't seem like
much of an argument.  As for length, only \z seems to be in trouble and
that could probably be shortened.
        regards, tom lane