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 3
 fo
----
 10
(1 row)

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

Thank you
Pavel Stehule

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to