Re: Get table catalog from pg_indexes - Mailing list pgsql-general

From Igor Korot
Subject Re: Get table catalog from pg_indexes
Date
Msg-id CA+FnnTwJEgj5SLYzw1K62=q=h7aXP-5L2dszP3ThSod4qXkfJw@mail.gmail.com
Whole thread Raw
In response to Re: Get table catalog from pg_indexes  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Get table catalog from pg_indexes
List pgsql-general
Ron,

On Sun, Nov 27, 2022 at 4:10 PM Ron <ronljohnsonjr@gmail.com> wrote:
>
> On 11/27/22 15:55, Adrian Klaver wrote:
> > On 11/27/22 13:31, Ron wrote:
> >> 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
> >
> > What the OP was looking for a field in the above that was catalogname or
> > datname per:
>
> I've never heard of a database referred to as a catalog.  (That's always
> been where a database's metadata -- i.e. the pg_catalog schema -- is stored.)

In the ODBC terminology the DB is usually referenced as catalog.

Thank you.

>
> --
> Angular momentum makes the world go 'round.
>
>



pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: Get table catalog from pg_indexes
Next
From: Adrian Klaver
Date:
Subject: Re: Get table catalog from pg_indexes