caching issue in function

Поиск
Список
Период
Сортировка
От Brandon Metcalf
Тема caching issue in function
Дата
Msg-id Pine.LNX.4.58L.0811191424110.13425@cash.us.nortel.com
обсуждение исходный текст
Список pgsql-general
I'm just starting to investigate a problem where it seems data stored
in a variable from one invocation of a function is bleeding over to
the next invocation.  For example, in a PL/PerlU function I'm getting
the table name with

  my $table = $_TD->{relname}

and immediately print it out and all seems fine.  If I perform an
INSERT or DELETE on one table that causes the trigger using this
function to fire and then immediately perform and INSERT on DELETE on
another table where this trigger is attached, $table appears to have
the correct value (that is the second table name), but when I use
$table later in the function, it contains the name of the first table
that the function ran against.

If I close my session and open a new one, the second operation above
that had the wrong value for $table works as it should.  It seems
there is some caching going on between invocations of this function.

I haven't narrowed this down to a very simple case that demonstrates
the problem, but thought I would ask if anyone has seen anything like
this before going any further.

Thanks.


--
Brandon

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

Предыдущее
От: WireSpot
Дата:
Сообщение: Prepared statement already exists
Следующее
От: Howard Cole
Дата:
Сообщение: Re: How to reduce impact of a query.