Re: Get table catalog from pg_indexes

Поиск
Список
Период
Сортировка
Искать
От
Ron
Тема
Re: Get table catalog from pg_indexes
Дата
Msg-id
467d46cc-553f-0014-5a09-6ddf7ccf4fdb@gmail.com
Ответ на
Список
Дерево обсуждения
Get table catalog from pg_indexes Igor Korot <ikorot01@gmail.com>
Re: Get table catalog from pg_indexes Erik Wienhold <ewie@ewie.name>
Re: Get table catalog from pg_indexes Igor Korot <ikorot01@gmail.com>
Re: Get table catalog from pg_indexes Adrian Klaver <adrian.klaver@aklaver.com>
Re: Get table catalog from pg_indexes Christophe Pettus <xof@thebuild.com>
Re: Get table catalog from pg_indexes Igor Korot <ikorot01@gmail.com>
Re: Get table catalog from pg_indexes "David G. Johnston" <david.g.johnston@gmail.com>
Re: Get table catalog from pg_indexes Christophe Pettus <xof@thebuild.com>
Re: Get table catalog from pg_indexes "David G. Johnston" <david.g.johnston@gmail.com>
Re: Get table catalog from pg_indexes Igor Korot <ikorot01@gmail.com>
Re: Get table catalog from pg_indexes Adrian Klaver <adrian.klaver@aklaver.com>
Re: Get table catalog from pg_indexes Ron <ronljohnsonjr@gmail.com>
Re: Get table catalog from pg_indexes Adrian Klaver <adrian.klaver@aklaver.com>
Re: Get table catalog from pg_indexes Ron <ronljohnsonjr@gmail.com>
Re: Get table catalog from pg_indexes Igor Korot <ikorot01@gmail.com>
Re: Get table catalog from pg_indexes Thomas Kellerer <shammat@gmx.net>
Re: Get table catalog from pg_indexes Ron <ronljohnsonjr@gmail.com>
Re: Get table catalog from pg_indexes Igor Korot <ikorot01@gmail.com>
On 11/27/22 11:22, Igor Korot wrote:
Hi, ALL,
Table pg_indexes does not contain a field for a catalog.

So how do I get that?

SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND
schemaname = $3

You did not look hard enough, or Google "postgresql pg_indexes".

test=# \d pg_indexes
            View "pg_catalog.pg_indexes"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 indexname  | name |           |          |
 tablespace | name |           |          |
 indexdef   | text |           |          |

https://www.postgresql.org/docs/current/view-pg-indexes.html




--
Angular momentum makes the world go 'round.
В списке pgsql-general по дате отправления
От: David G. Johnston
Дата:
От: Adrian Klaver
Дата:
FAQ