Search Postgresql Archives

Re: Finding description pg_description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Susan Hurst <susan.hurst@xxxxxxxxxxxxxxxxxx> writes:
> How do I find the source of an objoid from pg_catalog.pg_description?

The classoid column holds the OID of the system catalog that contains
the object's defining row.  The objoid column is the OID of the object,
ie the "oid" column of that row.  (If you are working with a pre-v12
PG release you might be confused by the fact that the oid column is
hidden by default.  But it's there and you can select it.)

Depending on what you're doing, you might prefer to use the
pg_describe_object() function to decipher those columns:

regression=# select classoid::regclass, pg_describe_object(classoid, objoid, objsubid), description from pg_description limit 5;
 classoid |        pg_describe_object         |                     description                      
----------+-----------------------------------+------------------------------------------------------
 pg_proc  | function ts_debug(regconfig,text) | debug function for text search configuration
 pg_proc  | function ts_debug(text)           | debug function for current text search configuration
 pg_proc  | function boolin(cstring)          | I/O
 pg_proc  | function boolout(boolean)         | I/O
 pg_proc  | function byteain(cstring)         | I/O
(5 rows)

Alternately, locutions like "where classoid = 'pg_proc'::regclass"
might be helpful.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux