Bug #570: \d in psql does not show triggers

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #570: \d in psql does not show triggers
Дата
Msg-id 200202011341.g11Df5s66150@postgresql.org
обсуждение исходный текст
Ответы Re: Bug #570: \d in psql does not show triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Gerald Vogt (gv_de@yahoo.de) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
\d in psql does not show triggers

Long Description
When using \d in psql to find details of a table, occasionally
triggers will not be listed although the table does have triggers. This happens when the table does not have any rules.

e.g.:

SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules from pg_class where relname='pub_liste';
 relhasindex | relkind | relchecks | reltriggers | relhasrules
-------------+---------+-----------+-------------+-------------
 t           | r       |         0 |          25 | f
(1 row)

However:

\d pub_liste
              Table "pub_liste"
 Attribute |         Type          | Modifier
-----------+-----------------------+----------
...
Index: pub_liste_pkey

This is due to a bug in bin/psql/describe.c line 793
< if (!error && tableinfo.hasrules)
should probably be
> if (!error && tableinfo.triggers)

Gerald

Sample Code


No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Stefano Reksten
Дата:
Сообщение: Re: New to Postgresql - Backend timeout /JDBC
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug #570: \d in psql does not show triggers