\dv and other lists SQL are unnecessarily complicated

Поиск
Список
Период
Сортировка
От Bug Finder
Тема \dv and other lists SQL are unnecessarily complicated
Дата
Msg-id 1019169882.1683.74.camel@home1.example.com
обсуждение исходный текст
Ответы Re: \dv and other lists SQL are unnecessarily complicated  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Hello

Please forgive me if this has been discussed before.

\dv and other lists SQL are unnecessarily complicated.

They all seem to be based on the \d SQL

\dv currently uses

SELECT c.relname as "Name",
  CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i'
THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as
"Type",
  u.usename as "Owner"
FROM pg_class c LEFT JOIN pg_user u ON c.relowner = u.usesysid
WHERE c.relkind IN ('v','')
  AND c.relname !~ '^pg_'
ORDER BY 1;

when

SELECT c.relname as "Name", 'view' as "Owner"
FROM pg_class c LEFT JOIN pg_user u ON c.relowner = u.usesysid
WHERE c.relkind IN ('v','')
  AND c.relname !~ '^pg_'
ORDER BY 1;

does the same thing

Is there a reason for this? Was it a cut'n'paste frenzy? not that there
is anything wrong with that - whatever gets it done.

Cheers,

Neil

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

Предыдущее
От: Roy Souther
Дата:
Сообщение: Paradox to PostgreSQL?
Следующее
От: Curt Sampson
Дата:
Сообщение: Re: Questions on 7.2.1 query plan choices