Re: Can't query system tables during transaction

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Can't query system tables during transaction
Date: 2020-10-04 20:30:35
Message-ID: 1567426.1601843435@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Igor Korot <ikorot01(at)gmail(dot)com> writes:
> 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;

I suppose you meant to put quotes around 'public'?

> I'm getting the following error:
> ERROR: current transaction is aborted, commands ignored until end of
> transaction block

This has nothing to do with the current command, but with failure
of some previous command in the transaction.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2020-10-04 20:58:08 Re: Can't query system tables during transaction
Previous Message Adrian Klaver 2020-10-04 20:24:49 Re: Can't query system tables during transaction