Re: Add psql command to list constraints

Поиск
Список
Период
Сортировка
Искать
От
Justin Pryzby
Тема
Re: Add psql command to list constraints
Дата
Msg-id
20211116020214.GV17618@telsasoft.com
Ответ на
Список
Дерево обсуждения
Add psql command to list constraints Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Re: Add psql command to list constraints Justin Pryzby <pryzby@telsasoft.com>
Re: Add psql command to list constraints Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Re: Add psql command to list constraints Justin Pryzby <pryzby@telsasoft.com>
Re: Add psql command to list constraints Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Re: Add psql command to list constraints "David G. Johnston" <david.g.johnston@gmail.com>
Re: Add psql command to list constraints Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Add psql command to list constraints "David G. Johnston" <david.g.johnston@gmail.com>
Re: Add psql command to list constraints "David G. Johnston" <david.g.johnston@gmail.com>
Thanks for updating the patch :)

> Currently, DBAs need the table name to see the constraint information.

Or, they can query pg_constraint or information_schema: check_constraints,
table_constraints.

> -				success = listConversions(pattern, show_verbose, show_system);
> +				if (strncmp(cmd, "dco", 3) == 0) /* Constraint */
> +					switch (cmd[3])
> +					{
> +						case '\0':
> +						case '+':

Does "+" do anything ?

> +++ b/src/bin/psql/help.c
> @@ -231,6 +231,7 @@ slashUsage(unsigned short int pager)

>  	fprintf(output, _("  \\db[+]  [PATTERN]      list tablespaces\n"));
>  	fprintf(output, _("  \\dc[S+] [PATTERN]      list conversions\n"));
> +	fprintf(output, _("  \\dco[S] [PATTERN]      list constraint\n"));

Should be plural "constraints".

I think "exclude" should be called "exclusion" ("exclude" sounded to me like
you're going to provide a way to "exclude" types of constraints, like "xc"
would show everything except check constraints).

-- 
Justin


В списке pgsql-hackers по дате отправления
От: Alexander Korotkov
Дата:
Сообщение: Re: Slow standby snapshot
От: David G. Johnston
Дата:
FAQ