postgrespro/pg_variables

Error with transactional pgv_insert/pgv_remove

Fenoman opened this issue · 1 comments

Here is a short example that shows the problem:

BEGIN TRANSACTION;

SELECT
    pgv_insert('test', 'x', ROW (1::int), TRUE);

--... do some actions ...

-- remove package (!!!)
SELECT
    pgv_remove('test');

--... do some other actions ...

-- Error: there is a record in the variable "x" with same key
-- But we deleted the package!!!
SELECT
    pgv_insert('test', 'x', ROW (1::int), TRUE);

COMMIT;

Спасибо огромное! Теперь все работает как надо.