Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPAeZ-0002JC-L3 for pgsql-general@arkaria.postgresql.org; Sun, 04 Oct 2020 20:30:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPAeY-0000i1-Hn for pgsql-general@arkaria.postgresql.org; Sun, 04 Oct 2020 20:30:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPAeY-0000hr-A3 for pgsql-general@lists.postgresql.org; Sun, 04 Oct 2020 20:30:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPAeW-0004wL-8J for pgsql-general@lists.postgresql.org; Sun, 04 Oct 2020 20:30:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 094KUZ1a1567427; Sun, 4 Oct 2020 16:30:35 -0400 From: Tom Lane To: Igor Korot cc: "pgsql-generallists.postgresql.org" Subject: Re: Can't query system tables during transaction In-reply-to: References: Comments: In-reply-to Igor Korot message dated "Sun, 04 Oct 2020 15:14:29 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1567425.1601843435.1@sss.pgh.pa.us> Date: Sun, 04 Oct 2020 16:30:35 -0400 Message-ID: <1567426.1601843435@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Igor Korot 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