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+FnnTyYbNfbnekXGP=tpuFWpw_bFX7-xDVasyWFcsoSHZeDMw@mail.gmail.com
Whole thread Raw
In response to Re: Get table catalog from pg_indexes  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Get table catalog from pg_indexes  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
David,

On Sun, Nov 27, 2022 at 12:55 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Sun, Nov 27, 2022 at 11:42 AM Igor Korot <ikorot01@gmail.com> wrote:
>>
>>
>> It doesn't say anything about "current" DB - only the DB.
>
>
> Yes, but you must be connected to some database in order to execute this command: "the database" refers to this
databaseyou are connected to.
 

Yes, I am and I get that.

>
> The catalogs are not information_schema.
>
>>
>> However, I think I can try "SELECT 1 FROM <catalog>.pg_indexes...".
>> Will this work?
>>
>
> What is that even supposed to mean?  It also seems simple enough to just do that asking "will this work" is a waste
oftime.  Just try it.
 

Apparently it looks like this query fails to execute.
I am connected to the "draft" database and running

SELECT 1 FROM draft.pg_indexes;

gives:

[quote]
ERROR:schema "draft" does not exist
[/quote]

Thank you/

>
> David J.



pgsql-general by date:

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