Re: Accessing fields past CATALOG_VARLEN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Accessing fields past CATALOG_VARLEN
Дата
Msg-id 3915193.1641249333@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Accessing fields past CATALOG_VARLEN  (Ed Behn <ed@behn.us>)
Список 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 по дате отправления:

Предыдущее
От: Chapman Flack
Дата:
Сообщение: Re: Accessing fields past CATALOG_VARLEN
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...