what is necessary for filling SysCache? - Mailing list pgsql-hackers

From Pavel Stehule
Subject what is necessary for filling SysCache?
Date
Msg-id 162867790811260717t12db518cn7026908eb0dc7e2@mail.gmail.com
Whole thread Raw
Responses Re: what is necessary for filling SysCache?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello

I added two new columns to pg_proc. I have a problem because access
via SearchSysCache doesn't work
       /* Search syscache by name only */       catlist = SearchSysCacheList(PROCNAMEARGSNSP, 1,

CStringGetDatum(funcname),                                                                0, 0, 0);
       for (i = 0; i < catlist->n_members; i++)       {               HeapTuple       proctup =
&catlist->members[i]->tuple;              Form_pg_proc procform = (Form_pg_proc) GETSTRUCT(proctup);
 

...
elog(NOTICE, "%d", SysCacheGetAttr(PROCOID, proctup,
Anum_pg_proc_prondefargs, &isnull));
elog(NOTICE, "%d %d", procform->prondefargs, procform->pronargs);

result:

postgres=# select fo(10,20);
NOTICE:  1
NOTICE:  0 1
NOTICE:  2
NOTICE:  0 2
NOTICE:  2
NOTICE:  0 3fo
----10
(1 row)

what is mechanism, that select between directly accessed fields and
fields that are accessed via SysCacheGetAttr?

Thank you
Pavel Stehule


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [WIP] In-place upgrade
Next
From: Zdenek Kotala
Date:
Subject: Re: [WIP] In-place upgrade