Re: Accessing fields past CATALOG_VARLEN

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Ed Behn <ed(at)behn(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Accessing fields past CATALOG_VARLEN
Date: 2022-01-03 22:32:56
Message-ID: 61D37998.4060704@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/03/22 17:23, Ed Behn wrote:
> 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?

You can use SysCacheGetAttr with the attribute number. It knows all the
magic needed to find the right offset, possibly decompress, etc.

Regards,
-Chap

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-01-03 22:35:33 Re: Accessing fields past CATALOG_VARLEN
Previous Message Alvaro Herrera 2022-01-03 22:27:42 Re: SKIP LOCKED assert triggered