Re: call the same pl/pgsql procedure twice in the same connection

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: call the same pl/pgsql procedure twice in the same connection
Дата
Msg-id 200204181849.g3IInRM14849@saturn.janwieck.net
обсуждение исходный текст
Ответ на Re: call the same pl/pgsql procedure twice in the same connection  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: call the same pl/pgsql procedure twice in the same connection  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
Bruce Momjian wrote:
> Jan Wieck wrote:
> > Bruce Momjian wrote:
> > >
> > > Jan, instead of doing cache invalidation to fix temporary tables, can we
> > > disable cached plans for functions that use temporary tables?
> >
> >     I  was  thinking  of  a different approach. Enhancing the SPI
> >     manager to detect if a plan uses  temporary  objects  and  to
> >     remember  the  original  querystring  in the SPI_plan. Having
> >     callbacks when temp object  beeing  destroyed  into  the  SPI
> >     manager,  causing  it to reparse and plan on the next call to
> >     SPI_execp() would do it for everything that uses SPI.
>
> I was merely proposing that preventing caching of functions ueing temp
> tables may be easier than trying to invalidation them on temp table
> destruction.
   It's neat to say "preventing caching of functions using ...",   now tell in detail how you detect that a function
"is" using   a  temp table?  No, I don't mean how "you" can detect it, how   can the PL/pgSQL parser or executor detect
it. And  when  do   you  detect  it?  Remember  that  PL/pgSQL  has  delayed  SPI   preparation?
 
   Second, it doesn't really look smart to me to prevent  saving   of  all  query  plans  just  because  one of them
usesa temp   table.
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: SQL Query Optimization
Следующее
От: Fduch the Pravking
Дата:
Сообщение: Re: DISTINCT ON ... without distinct null values ?