Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDt7c-0004rA-4Z for pgsql-docs@arkaria.postgresql.org; Tue, 09 Apr 2019 15:57:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDt7a-0005PH-Qc for pgsql-docs@arkaria.postgresql.org; Tue, 09 Apr 2019 15:57:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDt7a-0005OV-Gb for pgsql-docs@lists.postgresql.org; Tue, 09 Apr 2019 15:57:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDt7Y-0007Fx-6Y for pgsql-docs@lists.postgresql.org; Tue, 09 Apr 2019 15:57:13 +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 x39FvAqs018319; Tue, 9 Apr 2019 11:57:10 -0400 From: Tom Lane To: jindrich@vavruska.cz cc: pgsql-docs@lists.postgresql.org Subject: Re: Section 4.1.2.7 contains false information In-reply-to: <155482249597.1372.1459692771442036097@wrigleys.postgresql.org> References: <155482249597.1372.1459692771442036097@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Tue, 09 Apr 2019 15:08:15 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18317.1554825430.1@sss.pgh.pa.us> Date: Tue, 09 Apr 2019 11:57:10 -0400 Message-ID: <18318.1554825430@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Doc comments form writes: > QUOTE: > The CAST() syntax conforms to SQL. The type 'string' syntax is a > generalization of the standard: SQL specifies this syntax only for a few > data types, but PostgreSQL allows it for all types. The syntax with :: is > historical PostgreSQL usage, as is the function-call syntax. > UNQUOTE > In fact, this is not 100% true. TIMESTAMP 'string' does not work this way. Looks like it works to me: regression=# select timestamp '2019-04-09 11:49'; timestamp --------------------- 2019-04-09 11:49:00 (1 row) If you feel that the documentation is unclear, you need to be clearer about how it's unclear ;-) (Reading between the lines of this complaint and your adjacent one, I kind of suspect that you were trying to use "TIMESTAMP something" where the something wasn't a literal string constant. But surely 4.1.2.7 makes it plain that the discussed syntax is for constants. You might need to read 4.2.9 "Type Casts" instead.) regards, tom lane