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 1jJss1-00008X-0e for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2020 05:58:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJsrz-0006zA-5y for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2020 05:58:27 +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 1jJsry-0006w2-Ua for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2020 05:58:26 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jJsrw-0004M4-22 for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2020 05:58:25 +0000 Received: by mail-qk1-x743.google.com with SMTP id x3so2822642qki.4 for ; Wed, 01 Apr 2020 22:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7n+grUlp4uAyvkp6m6uq+WVWCJtR/pK8vchVUc00zZ0=; b=VjOFpRz2DxJPvb9qQ0pxp7vf+ImPPzzedv6Bqi9ndCGS4Okt6DEMwXzawVsIInNOTZ IGtbKSO4jy21tamGspiQ6Og8/RPY0WdmDum73TQ+DpRp7bdY2sPt7SlPfSadcooff6OZ xw+j5HC7vLpN0BAc2EI62usAjZx+RzIU80VZSntpEFUgKAMz0tuNO0LMMxkXGiGnSCG+ vWzonJ/P0meQC7Lml1SGkUgj4F5Hn+IF6gOuTjNknjYVemOpFi6ghDaRjOLcfcruOVoh bNJm5xJ2IWvOOB6EOZuFkC+QC2FgH1c5WM8TyxSmCT1r2zxnknMk/RM/f92JydfBIEaK NThg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7n+grUlp4uAyvkp6m6uq+WVWCJtR/pK8vchVUc00zZ0=; b=qIqHpYVOY2G5q8GRIvLFtDdKSyn4kF3vsiefIzDsvVBr+nR+E6V+JJZ9WbEKYrUyP8 LTuqrKaQHL0guUpAxXb9vcoj8ayMA+zA/dpDW4yMHk+zGw8tZ822nwc1h3DPf0HzlYZd 02Z7acZl6ezOkInaeYfe4wiEU9OHJFnkjKduG2MeZTS/ninha0KphUaJFhK0Ic0H9pIK ccV1y1lwuJAOElJrkCd9dMv5PdFCFLKaqss+970laNNl77dE8e3qY/y/NyTmi9eDBFeS pEQBLT8h3FtThTUuj/PxecQtHOCLOkbXv55r0XjPcHR0adfQ/kMPVKHWudZ1lfewdq86 Xe6g== X-Gm-Message-State: AGi0PuYmex2YDCWJSoFqHIPGZUKdw4lXKSWsskqcgX5TjEgNm7UBVMx6 ljJvE7dOwD9KSNmE5vzxlxoHQw== X-Google-Smtp-Source: APiQypIXyDn4gFogACNmpPBK1mF26jUu6Z4wivakCcUar1E0NSs1+77huGoPvubkKYFeUGuP3WmROg== X-Received: by 2002:a37:4902:: with SMTP id w2mr1670949qka.13.1585807103138; Wed, 01 Apr 2020 22:58:23 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 17sm2924014qkm.105.2020.04.01.22.58.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Apr 2020 22:58:21 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id DDB2D800755; Thu, 2 Apr 2020 00:58:19 -0500 (CDT) Date: Thu, 2 Apr 2020 00:58:19 -0500 From: Justin Pryzby To: Fabien COELHO Cc: Kyotaro Horiguchi , david.zhang@highgo.ca, pgsql-hackers@lists.postgresql.org, postgresql.org@coelho.net Subject: Re: Allow continuations in "pg_hba.conf" files Message-ID: <20200402055819.GD14618@telsasoft.com> References: <158578681240.24526.8013390670578487331.pgcf@coridan.postgresql.org> <20200402.132543.416761724007436728.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Apr 02, 2020 at 07:25:36AM +0200, Fabien COELHO wrote: > > Hello, > > > FWIW, I don't think so. Generally a trailing backspace is an escape > > character for the following newline. And '\ ' is a escaped space, > > which is usualy menas a space itself. > > > > In this case escape character doesn't work generally and I think it is > > natural that a backslash in the middle of a line is a backslash > > character itself. > > I concur: The backslash char is only a continuation as the very last > character of the line, before cr/nl line ending markers. > > There are no assumption about backslash escaping, quotes and such, which > seems reasonable given the lexing structure of the files, i.e. records of > space-separated words, and # line comments. Quoting does allow words containing spaces: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html |A record is made up of a number of fields which are separated by spaces and/or |tabs. Fields can contain white space if the field value is double-quoted. |Quoting one of the keywords in a database, user, or address field (e.g., all or |replication) makes the word lose its special meaning, and just match a |database, user, or host with that name. -- Justin