Re: Accessing fields past CATALOG_VARLEN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Accessing fields past CATALOG_VARLEN
Date
Msg-id 3915193.1641249333@sss.pgh.pa.us
Whole thread Raw
In response to Accessing fields past CATALOG_VARLEN  (Ed Behn <ed@behn.us>)
List pgsql-hackers
Ed Behn <ed@behn.us> writes:
> I can get fields like procStruct->prokind and procStruct->proretset.
> However, I get a compiler error when I try to access procStruct->proargmodes.
> I know that this is because this field is in the CATALOG_VARLEN block which
> makes it invisible to the compiler.
> What is the proper way to get this field?

SysCacheGetAttr().  There are examples all over the tree, but
one that's specific to proargmodes (and also illustrates the
best practices for deciphering its value) is in
parser/analyze.c's transformCallStmt().

You should also ask yourself if you really *need* to examine
proargmodes for yourself, or if there's a utility function
somewhere that will compute what you need to know.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: Accessing fields past CATALOG_VARLEN
Next
From: Tom Lane
Date:
Subject: Re: Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...