X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BF9B95290D for ; Fri, 24 Jun 2005 11:32:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56255-09 for ; Fri, 24 Jun 2005 14:32:37 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A68CE528B7 for ; Fri, 24 Jun 2005 11:32:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j5OEWYW6028945; Fri, 24 Jun 2005 10:32:34 -0400 (EDT) To: Bruce Momjian Cc: Rod Taylor , Markus Bertheau , PgSQL - SQL Subject: Re: empty view, replace view, column type change? In-reply-to: <200506240432.j5O4WF026888@candle.pha.pa.us> References: <200506240432.j5O4WF026888@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 24 Jun 2005 00:32:15 -0400" Date: Fri, 24 Jun 2005 10:32:34 -0400 Message-ID: <28944.1119623554@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/292 X-Sequence-Number: 21893 Bruce Momjian writes: > Tom Lane wrote: >> but it doesn't seem to me to follow from what the spec says that we need >> to explicitly cast the result of now() to six places. As long as it's >> coming from gettimeofday it can't have more than 6 places anyway, and so >> we might as well save the extra coercion step. (The parser *will* tack >> on a separate coercion function call when presented with this parse >> tree.) >> >> In short, I'm inclined to remove the above-quoted lines, and similarly >> for CURRENT_TIME, CURRENT_TIMESTAMP, and LOCALTIME. Thoughts? > Agreed. That "6" bothered me too when I was cleaning up the timestamp > code a while back. Done. On re-reading the spec, I see that the default of six places is intended to apply to ALL occurrences of timestamp --- that is, they intend CREATE TABLE foo (ts timestamp); to mean CREATE TABLE foo (ts timestamp(6)); We have deliberately decided not to do that, on a fairly consistent basis --- numeric and varchar don't have any fixed precision limit either if you don't specify. So these functions were out of step with the rest of the system, and removing their explicit precision limit is indeed a sane way of improving consistency. regards, tom lane