Can't query system tables during transaction - Mailing list pgsql-general

From Igor Korot
Subject Can't query system tables during transaction
Date
Msg-id CA+FnnTyiz8i86MAVWriL4wzC1iSiZvqGjUpAMHiZoP+4cZNE1Q@mail.gmail.com
Whole thread Raw
Responses Re: Can't query system tables during transaction
Re: Can't query system tables during transaction
List 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 by date:

Previous
From: Robert Inder
Date:
Subject: Re: Writing WAL files
Next
From: Adrian Klaver
Date:
Subject: Re: Can't query system tables during transaction