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 1paKDa-00035m-6c for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 17:38:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1paKDY-0000Lr-VD for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 17:38:16 +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 1paKDY-0000Lc-Lm for pgsql-hackers@lists.postgresql.org; Thu, 09 Mar 2023 17:38:16 +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 1paKDW-0004uj-0T for pgsql-hackers@lists.postgresql.org; Thu, 09 Mar 2023 17:38:16 +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 329Hc7UW429188; Thu, 9 Mar 2023 12:38:08 -0500 From: Tom Lane To: Jim Jones cc: Peter Eisentraut , Peter Smith , Nikolay Samokhvalov , PostgreSQL Hackers , Andrey Borodin Subject: Re: [PATCH] Add pretty-printed XML output option In-reply-to: <1cbe1087-6acb-2b0a-dc9b-0a2d5b99e466@uni-muenster.de> References: <2f5df461-dad8-6d7d-4568-08e10608a69b@uni-muenster.de> <62643598-b80d-90f4-8901-b85dccadf4c4@enterprisedb.com> <4c2efca5-8257-2424-6687-07c65e319e95@uni-muenster.de> <2eac4d78-2b20-e8ec-54cc-22a88653a1cc@uni-muenster.de> <6cb296fe-4b49-3691-633e-2e2366997b04@uni-muenster.de> <3baf8f25-3bd7-7db5-0b31-e4c92b6269ba@enterprisedb.com> <1cbe1087-6acb-2b0a-dc9b-0a2d5b99e466@uni-muenster.de> Comments: In-reply-to Jim Jones message dated "Thu, 23 Feb 2023 09:20:00 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <429186.1678383487.1@sss.pgh.pa.us> Date: Thu, 09 Mar 2023 12:38:07 -0500 Message-ID: <429187.1678383487@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk While reviewing this patch, I started to wonder why we don't eliminate the maintenance hassle of xml_1.out by putting in a short-circuit at the top of the test, similar to those in some other scripts: /* skip test if XML support not compiled in */ SELECT 'one'::xml; \if :ERROR \quit \endif (and I guess xmlmap.sql could get the same treatment). The only argument I can think of against it is that the current approach ensures we produce a clean error (and not, say, a crash) for all xml.c entry points not just xml_in. I'm not sure how much that's worth though. The compiler/linker would tell us if we miss compiling out every reference to libxml2. Thoughts? regards, tom lane