Re: SPI/backend equivalent of extended-query Describe(statement)?
От | Chapman Flack |
---|---|
Тема | Re: SPI/backend equivalent of extended-query Describe(statement)? |
Дата | |
Msg-id | 5B08ABA2.7060903@anastigmatix.net обсуждение исходный текст |
Ответ на | Re: SPI/backend equivalent of extended-query Describe(statement)? (Andrew Gierth <andrew@tao11.riddles.org.uk>) |
Ответы |
Re: SPI/backend equivalent of extended-query Describe(statement)?
|
Список | pgsql-hackers |
On 05/25/18 20:07, Andrew Gierth wrote: > >> with writing a ParserSetupHook that's just a thin wrapper around > >> parse_variable_parameters ? > > That's what I did in pllua-ng. The tricky bit was in arranging to also > call check_variable_parameters; I considered skipping that part, but > that seemed like it could be potentially problematic. > > https://github.com/pllua/pllua-ng/blob/master/src/spi.c#L266 > >/* > * GAH. To do parameter type checking properly, we have to install our > * own global post-parse hook transiently. > */ >... >PG_TRY(); >{ > pllua_spi_prev_parse_hook = post_parse_analyze_hook; > post_parse_analyze_hook = pllua_spi_prepare_checkparam_hook; >... >PG_CATCH(); >{ > post_parse_analyze_hook = pllua_spi_prev_parse_hook; > --pllua_spi_prepare_recursion; > PG_RE_THROW(); >... Gah, indeed. Thanks for the heads up. I would never have guessed it'd be that fiddly. -Chap
В списке pgsql-hackers по дате отправления: