From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dmitry Lazurkin <dilaz03(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Change location of function/type installed from C-extension |
Date: | 2017-08-26 15:24:58 |
Message-ID: | 21401.1503761098@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Dmitry Lazurkin <dilaz03(at)gmail(dot)com> writes:
> select relname, relfilenode from pg_class where relfilenode = 11829;
> relname | relfilenode
> ---------+-------------
> (0 rows)
> Hmmm. Where is table with filenode 11829?
pg_class.relfilenode doesn't contain useful data for pg_proc and some other
critical system catalogs:
regression=# select relname, relfilenode from pg_class where relname like 'pg_proc%';
relname | relfilenode
--------------------------------+-------------
pg_proc_oid_index | 0
pg_proc | 0
pg_proc_proname_args_nsp_index | 0
(3 rows)
You need to use pg_relation_filenode():
regression=# select relname, pg_relation_filenode(oid) from pg_class where relname like 'pg_proc%';
relname | pg_relation_filenode
--------------------------------+----------------------
pg_proc_oid_index | 12662
pg_proc | 12657
pg_proc_proname_args_nsp_index | 12663
(3 rows)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Lazurkin | 2017-08-26 18:50:10 | Re: Change location of function/type installed from C-extension |
Previous Message | Tom Lane | 2017-08-26 15:12:46 | Re: Retrieving query results |