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 1qIVIe-0001Ih-5L for pgsql-general@arkaria.postgresql.org; Sun, 09 Jul 2023 14:22:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qIVId-00069V-1h for pgsql-general@arkaria.postgresql.org; Sun, 09 Jul 2023 14:22:07 +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 1qIVIc-00069K-N1 for pgsql-general@lists.postgresql.org; Sun, 09 Jul 2023 14:22:06 +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 1qIVIa-002tNk-9f for pgsql-general@lists.postgresql.org; Sun, 09 Jul 2023 14:22:05 +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 369EM2d01867892; Sun, 9 Jul 2023 10:22:02 -0400 From: Tom Lane To: jian he cc: pgsql-general list Subject: Re: now() literal in pg_input_is_valid In-reply-to: References: Comments: In-reply-to jian he message dated "Sun, 09 Jul 2023 20:13:13 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1867890.1688912522.1@sss.pgh.pa.us> Date: Sun, 09 Jul 2023 10:22:02 -0400 Message-ID: <1867891.1688912522@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk jian he writes: > should I expect > select pg_input_is_valid($$[now(), infinity)$$,'tstzrange'); > returns true? No. "now()" is not a literal, it's a function call. regards, tom lane