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 1q5rjt-0004IY-Lf for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Jun 2023 17:42:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q5rjs-0001VL-Ge for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Jun 2023 17:42:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q5rjs-0001VB-7p for pgsql-hackers@lists.postgresql.org; Sun, 04 Jun 2023 17:42:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q5rjp-000BlC-Ps for pgsql-hackers@lists.postgresql.org; Sun, 04 Jun 2023 17:41:59 +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 354Hfpo63977577; Sun, 4 Jun 2023 13:41:51 -0400 From: Tom Lane To: Kirk Wolak cc: "Imseih (AWS), Sami" , Peter Eisentraut , PostgreSQL Hackers Subject: Re: [BUG] pg_dump does not properly deal with BEGIN ATOMIC function In-reply-to: References: <2C1933AB-C2F8-499B-9D18-4AC1882256A0@amazon.com> <49272.1685708176@sss.pgh.pa.us> <1868.1685816891@sss.pgh.pa.us> Comments: In-reply-to Kirk Wolak message dated "Sat, 03 Jun 2023 23:10:19 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3977575.1685900511.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sun, 04 Jun 2023 13:41:51 -0400 Message-ID: <3977576.1685900511@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kirk Wolak writes: > On Sat, Jun 3, 2023 at 2:28 PM Tom Lane wrote: >> I'm not really sure which of these I like better. The first one >> is a much simpler code change, and there is some value in labeling >> the output like that. The second patch's output seems less cluttered, >> but it's committing a modularity sin by embedding formatting knowledge >> at the caller level. Thoughts? > Honestly the double space in front of the strings with either the Original > version, > or the "detail:" version is great. > While I get the "Less Cluttered" version.. It "detaches" it a bit too much > from the lead in, for me. Done with pg_log_warning_detail. I ended up taking out the two spaces, as that still felt like a modularity violation. Also, although the extra space looks alright in English, I'm less sure about how it'd look in another language where "warning:" and "detail:" get translated to strings of other lengths. So the new output (before 016107478 fixed it) is pg_dump: warning: could not resolve dependency loop among these items: pg_dump: detail: FUNCTION a_f (ID 216 OID 40532) pg_dump: detail: CONSTRAINT a_pkey (ID 3466 OID 40531) pg_dump: detail: POST-DATA BOUNDARY (ID 3612) pg_dump: detail: TABLE DATA a (ID 3610 OID 40525) pg_dump: detail: PRE-DATA BOUNDARY (ID 3611) regards, tom lane