pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Timestamp operator error
Date: Mon, 25 Feb 2002 20:34:36 -0800
Message-ID: <web-810140@davinci.ethosmedia.com> (raw)
In-Reply-To: <27215.1014697694@sss.pgh.pa.us>

Tom,

> AFAICT, what's happening in 7.2 is that the closest-match operator
> is "time + date", so it casts the interval to time (yielding 0
>  hours),
> and casts current_timestamp to date (yielding midnight today)
> and adds.

Any suggestions on an emergency fix for my (production) database?
  We've already seen a couple of major problems from this bug, and I'm
 worried that there will be others that I don't catch until it's too
 late.  If I had the know-how, I'd fix the operator myself, but I
 don't.

> I suspect this is good ammunition for the argument I've made from
>  time
> to time that we have too many implicit conversions, not too few.

Yes, definitely.  Frankly, I'd prefer a large reduction in implicit
 conversions; I just got into trouble with the difference between
 current_timestamp and current_date that I would have caught much
 earlier if Postgres had disallowed the implicit conversion. 

-Josh 


______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco



view thread (10+ messages)  latest in thread

Message-ID: <web-810140@davinci.ethosmedia.com>
Permalink:  ../web-810140@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-810140@davinci.ethosmedia.com

 · 

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: josh@agliodbs.com, tgl@sss.pgh.pa.us
  Subject: Re: Timestamp operator error
  In-Reply-To: <web-810140@davinci.ethosmedia.com>

* 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