what is necessary for filling SysCache?

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "postgres hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: what is necessary for filling SysCache?
Date: 2008-11-26 15:17:25
Message-ID: 162867790811260717t12db518cn7026908eb0dc7e2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2008-11-26 15:18:35 Re: [WIP] In-place upgrade
Previous Message Alvaro Herrera 2008-11-26 14:55:50 Re: [WIP] In-place upgrade