pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Rod Taylor <pg@rbt.ca>
Cc: Markus Bertheau <twanger@bluetwanger.de>
Cc: PgSQL - SQL <pgsql-sql@postgresql.org>
Subject: Re: empty view, replace view, column type change?
Date: Fri, 24 Jun 2005 10:32:34 -0400
Message-ID: <28944.1119623554@sss.pgh.pa.us> (raw)
In-Reply-To: <200506240432.j5O4WF026888@candle.pha.pa.us>
References: <200506240432.j5O4WF026888@candle.pha.pa.us>

Bruce Momjian <pgman@candle.pha.pa.us> 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



view thread (8+ messages)

Message-ID: <28944.1119623554@sss.pgh.pa.us>
Permalink:  ../28944.1119623554@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28944.1119623554@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, pg@rbt.ca, twanger@bluetwanger.de
  Subject: Re: empty view, replace view, column type change?
  In-Reply-To: <28944.1119623554@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox