Re: Bug Repoprt- Casting Issues - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: Bug Repoprt- Casting Issues
Date
Msg-id Pine.LNX.4.21.0006030225480.406-100000@localhost.localdomain
Whole thread Raw
In response to Re: Bug Repoprt- Casting Issues  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug Repoprt- Casting Issues
List pgsql-bugs
Tom Lane writes:

> If you'd prefer not to be concerned about the intermediate conversion
> to abstime, then use the date() notation.  The :: notation is designed
> for controlling the type conversion exactly.

Wow, that is definitely confusing. I had always thought that `::' is
"cast, no matter how", and date() is "call the function date, which
happens to do the conversion". But now it seems that the supposed "cast"
syntax is really just a dumb function call whereas the function syntax
actually does more intelligent work behind the scenes.

I have a feeling these type conversion issues aren't going away for a long
time...


--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: uniqueness not always correct
Next
From: Tom Lane
Date:
Subject: Re: Bug Repoprt- Casting Issues