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 1nxlc3-0004gS-5v for pgsql-docs@arkaria.postgresql.org; Sun, 05 Jun 2022 08:27:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nxlc2-0001JH-1C for pgsql-docs@arkaria.postgresql.org; Sun, 05 Jun 2022 08:27:54 +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 1nxlc1-0001J8-OD for pgsql-docs@lists.postgresql.org; Sun, 05 Jun 2022 08:27:53 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nxlbz-0002fW-Bu for pgsql-docs@postgresql.org; Sun, 05 Jun 2022 08:27:52 +0000 Received: by mail-pj1-x102c.google.com with SMTP id e24so10578446pjt.0 for ; Sun, 05 Jun 2022 01:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2d5gIfHbD7VlAemfT9+EiuqD3knQfdjmCSts3TH/k/0=; b=oV5AKjbW3dfW4Gx7q3/GJO5H+jLmEBX/nZ1Dxi7CDIyFyLB6M6NfYPi9QcaolIyDVE vFNOue5xUcZZAsrxV/7/D4ADlIMiJ7S/HDeR5M0hRgswEcUn7T376PIwbsA69mulgSSg n+8SsEJ7kvXugkEuZeoNbowZ9+1etU94e/jS5/M/Gd6pZYLjBJt1Sa92ZaKxrjaKDLfG A/1lVBguWNM1PtBeolliqmqPaDOMYODyFicY49pHx3tLxqkgzm2a7rVtk19t7QxHLneR vABcmVulN2LKZeSQhlPsMqsHetXeGZSIk3HK+g8tveJWFL2Rn+Ja2EJxxcNzkDgEAY0c nHsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2d5gIfHbD7VlAemfT9+EiuqD3knQfdjmCSts3TH/k/0=; b=q8eqETbOdQrBzWrGNqTE+Fw1G652fOpZe+7DuemVjZSlu2SAl5ih/J9uP0xN0lZ98e OlRTNJfVOJnHhpL/iAkJDlHeenMv1C2iW8zy4REiVTBZv4a9k3O+ey3QpytflIvWLAJk LMWyWXEe9gQ9HUx6klQjiZqix6pCzKingJX2sQnh18D51XzdUkZK/OD+h5heaHiKziFS I98nz3ZI13d4E24fIX8BZC552/se9FivUiwJ4Fl43ZyFCMxW72wm24p4HkI38qLWEhls oX3Yv+UxTuDqdXWe1YLS5pZTuCf8vi1qL3FclCvD7Fs4mYc0UaLuZ79b9xkPP0+dXxtY 9JoQ== X-Gm-Message-State: AOAM531yHJD4zE3az/65UchDwZJCecUMB04NqRHISJIB18wA1XJ7z8LS yHIjex8oZ9XrQnCw80n4lDg= X-Google-Smtp-Source: ABdhPJx6VtZfPN/EM9PY/wX+zaNGt4rzH6swWRm12+0w1Wya37s+BgmhEWi/X5NUPmex+KsdmcHD6g== X-Received: by 2002:a17:902:7c0e:b0:162:1aa9:f550 with SMTP id x14-20020a1709027c0e00b001621aa9f550mr18027777pll.159.1654417670214; Sun, 05 Jun 2022 01:27:50 -0700 (PDT) Received: from jrouhaud (2001-b011-1005-b09f-7413-0d6a-2fd0-dea1.dynamic-ip6.hinet.net. [2001:b011:1005:b09f:7413:d6a:2fd0:dea1]) by smtp.gmail.com with ESMTPSA id u1-20020a056a00098100b0051bc4ed56bcsm745333pfg.204.2022.06.05.01.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 01:27:49 -0700 (PDT) Date: Sun, 5 Jun 2022 16:27:43 +0800 From: Julien Rouhaud To: Shay Rojansky Cc: pgsql-docs@postgresql.org Subject: Re: Lower/upper-case consistency with function names Message-ID: <20220605082743.dts3yqpgcuqnh5y4@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Sun, Jun 05, 2022 at 10:20:23AM +0200, Shay Rojansky wrote: > > The PostgreSQL docs mostly show function names in lowercase (e.g. [1], > [2]), which seems to be the PostgreSQL-idiomatic thing to do. However, some > pages show functions in upper case, e.g. COALESCE/NULLIF/GREATEST/LEAST > ([3]). Is there some difference between these which warrants the case > difference, or just a case of docs inconsistency? > > I ran into this while trying to make Entity Framework (.NET ORM) generate > more idiomatic-looking SQL. If this is just an inconsistency, it's > obviously not very important. As mentioned in the doc in [3], COALESCE and all the others are actually not functions (those are specific keywords handled in the parser): > Although COALESCE, GREATEST, and LEAST are syntactically similar to > functions, they are not ordinary functions, and thus cannot be used with > explicit VARIADIC array arguments. As the rest of the keywords, they're case insensitive but our convention is to document them in uppercase. > [3] https://www.postgresql.org/docs/current/functions-conditional.html