Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anCFV-00022S-0R for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Apr 2016 21:41:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1anCFU-0007P3-HG for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Apr 2016 21:41:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1anCEs-0006iL-3G for pgsql-bugs@postgresql.org; Mon, 04 Apr 2016 21:40:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1anCEp-0006mt-7j for pgsql-bugs@postgresql.org; Mon, 04 Apr 2016 21:40:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u34Lehte014246; Mon, 4 Apr 2016 17:40:43 -0400 From: Tom Lane To: julian.schauder@credativ.de cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable. In-reply-to: <20160404194024.15198.21684@wrigleys.postgresql.org> References: <20160404194024.15198.21684@wrigleys.postgresql.org> Comments: In-reply-to julian.schauder@credativ.de message dated "Mon, 04 Apr 2016 19:40:24 -0000" Date: Mon, 04 Apr 2016 17:40:43 -0400 Message-ID: <14245.1459806043@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org julian.schauder@credativ.de writes: > PostgreSQLs ALTER SYSTEM accepts a newline in its string-statements. This > will cause the postgresql.auto.conf to become unreadable and requires system > intervention (aka removal of the auto.conf) Yeah, there's no provision for allowing a newline in postgresql.conf string literals. I believe we debated this in the past and decided it wasn't something we wanted to change, as it would create more confusion than it was worth (for example: what line number to ascribe to such an assignment). It looks like newline is the only troublesome character; there are quoting conventions for backslash and quote, which are the only other characters that are special there. > According to code analysis i believe the easiest way around this is > tightening the value validation and ignore whitespaces or just remove > newline as a whitespace. I'm inclined to just throw an error if someone tries this, not try to clean up after them. If we get lots of complaints about it, we will know we should revisit the aforementioned decision. But there's no reason to put restrictions on GUC values that aren't getting written by ALTER SYSTEM. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs