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 1m3hx4-0004q5-PB for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 16:41:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3hx3-0001b2-BG for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 16:41:37 +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 1m3hx3-0001at-3G for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 16:41:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3hww-0006vP-8F for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 16:41:35 +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 16EGfOYh3517930; Wed, 14 Jul 2021 12:41:25 -0400 From: Tom Lane To: Peter Eisentraut cc: Ranier Vilela , Laurenz Albe , PostgreSQL Hackers Subject: Re: printf %s with NULL pointer (was Re: BUG #17098: Assert failed on composing an error message when adding a type to an extension being dropped) In-reply-to: <3517180.1626280000@sss.pgh.pa.us> References: <17098-b960f3616c861f83@postgresql.org> <2468663.1626017338@sss.pgh.pa.us> <2984422.1626110456@sss.pgh.pa.us> <3227956.1626186568@sss.pgh.pa.us> <3280448.1626200778@sss.pgh.pa.us> <06a9ff0f-d1e9-0340-2f3b-180cefe41c7a@enterprisedb.com> <3517180.1626280000@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 14 Jul 2021 12:26:40 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3517928.1626280884.1@sss.pgh.pa.us> Date: Wed, 14 Jul 2021 12:41:24 -0400 Message-ID: <3517929.1626280884@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Interesting question, so I took a look: > https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprintf.c#n593 > case 's': > a = arg.p ? arg.p : "(null)"; BTW, the adjacent code shows that musl is also supporting glibc's "%m" extension, so I imagine that they are endeavoring to be compatible with glibc, and this goes along with that. But that just supports my larger point: printing "(null)" is clearly the de facto standard now, whether or not POSIX has caught up with it. regards, tom lane