From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | susan(dot)hurst(at)brookhurstdata(dot)com |
Cc: | Discuss List Postgres <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Finding description pg_description |
Date: | 2020-08-26 20:40:58 |
Message-ID: | 2945430.1598474458@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Susan Hurst <susan(dot)hurst(at)brookhurstdata(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Aleš Zelený | 2020-08-26 22:19:47 | Database cluster binary compatibility accross CPU platforms |
Previous Message | George Woodring | 2020-08-26 19:39:10 | Re: export to parquet |