Re: Timestamp operator error

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Timestamp operator error
Date: 2002-02-26 05:03:39
Message-ID: web-810156@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom,

> Emergency fix? This operator didn't behave reasonably in 7.1 either
> (at least not by my definition of reasonable). What exactly would
> you have us do?

No, not you! For me to fix. You're a volunteer, as far as I'm
involved. I just wanted suggestions for a quick fix. When I found
the other issues, it was more reasonable to search-and-replace on
values ("interval"() for interval() was easy). I can't figure out how
to pattern match on interval + timestamp, especially with variables
involved.

Is there a way, for example, that I could disallow the TIMESTAMP -->
DATE implicit conversion in my code? That would break all the
functions and views with this problem, and then I could identify them.

> Yah. Offhand I'd argue that no information-discarding conversion
> should be implicitly invokable. date->timestamp is fine;
> timestamp->date should require an explicit cast. I've already
> proposed
> that we add a flag to pg_proc to distinguish implicit from explicit
> conversion operations, and no one complained. But we have not yet
> begun to argue about exactly which conversions should be allowed
> implicitly...

Hey, feel free to take up the argument here, too! It is a SQL topic,
after all ...

-Josh

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-02-26 05:10:44 Re: Timestamp operator error
Previous Message Tom Lane 2002-02-26 04:47:35 Re: Timestamp operator error