Can't query system tables during transaction

Поиск
Список
Период
Сортировка
От Igor Korot
Тема Can't query system tables during transaction
Дата
Msg-id CA+FnnTyiz8i86MAVWriL4wzC1iSiZvqGjUpAMHiZoP+4cZNE1Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Can't query system tables during transaction  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Can't query system tables during transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi, ALL,
I'm trying to execute following:

SELECT 1 FROM pg_class c, pg_namespace n WHERE n.oid = c.relnamespace
AND c.relname = 'foo' AND n.nspname = public;

inside the transaction.

I'm getting the following error:

ERROR:  current transaction is aborted, commands ignored until end of
transaction block

Does this mean I can't query system tables during the transaction?
What is the problem here if it's not and how do I find out the reason?
And if it is - how to work around it?

I can probably commit it and start a new transaction, but I fear I will
have the same issue there...

Thank you.

If it matters - I'm working with C++ and libpq.



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

Предыдущее
От: Robert Inder
Дата:
Сообщение: Re: Writing WAL files
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Can't query system tables during transaction