BUG #18059: Unexpected error 25001 in stored procedure

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18059: Unexpected error 25001 in stored procedure
Дата
Msg-id 18059-79c692f036b25346@postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18059
Logged by:          Pavel Kulakov
Email address:      paul.kulakov@systematica.ru
PostgreSQL version: 15.4
Operating system:   Debian GNU/Linux 11
Description:

Steps to reproduce:
1. Create stored procedure

create or replace procedure test_proc()
language plpgsql as $procedure$
begin
   commit;
   set transaction isolation level repeatable read;
   -- here follows some useful code which is omitted for brevity
end
$procedure$;

2. Open new connection

3. Execute the following 3 queries one by one:
a) call test_proc();
b) create temporary table "#tmp"(c int) on commit drop;
c) call test_proc();
On step c) you'll get an error
[25001]: ERROR: SET TRANSACTION ISOLATION LEVEL must be called before any
query
  Where: SQL statement "set transaction isolation level repeatable read"
PL/pgSQL function test_proc() line 4 at SQL statement
--------------------------------------------
I used 3 different instruments with the same problem everywhere:
1) libpq in my own C++ application
2) DBeaver
3) npgsql in my own C# application

The same problem occures on PostgreSQL 14.4 running on Windows 10.


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()
Следующее
От: "Emile Amewoto (ZA)"
Дата:
Сообщение: Postgresql15 crash with :FATAL: could not open shared memory segment "/PostgreSQL.0000000": No such file or directory