Re: Feedback on writing extensible modules
От | Tom Lane |
---|---|
Тема | Re: Feedback on writing extensible modules |
Дата | |
Msg-id | 27574.1243786890@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Feedback on writing extensible modules (Dimitri Fontaine <dfontaine@hi-media.com>) |
Ответы |
Re: Feedback on writing extensible modules
Re: Feedback on writing extensible modules |
Список | pgsql-hackers |
Dimitri Fontaine <dfontaine@hi-media.com> writes: > Dimitri Fontaine <dfontaine@hi-media.com> writes: >> And currently calling SPI_connect() from _PG_init will crash the >> backend. I'll try to obtain a gdb backtrace, I've just been told about >> pre_auth_delay and post_auth_delay parameters. > Here we go: The reason this doesn't work is that SPI can only be invoked inside a transaction, and you're not inside one when a library is being preloaded. > I'm very interrested in being able > to prepare a query at local_preload_libraries time, if possible in 8.3 > and following releases. You could maybe make this work by executing your own transaction to do it, but I really have to wonder if it's a good idea. One point to think about is that elog(ERROR) still means elog(FATAL) at this point, so any brokenness in the queries you're trying to prepare will result in locking all users out of the database. regards, tom lane
В списке pgsql-hackers по дате отправления: