Re: Casting, again - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Casting, again
Date
Msg-id 39201A57.CBD37021@alumni.caltech.edu
Whole thread Raw
Responses Re: Casting, again  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> > btw, what were we hoping to accomplish with length(755)? Why isn't "3"
> > a good answer??
> If you believe it should have an answer at all, then 3 is probably
> the right answer.  But it used to be rejected, and I tend to think
> that that's the right behavior.  I don't like the idea of silent
> conversions from numeric-looking things into text.  It might be
> merely amusing in this case but in other cases it could be very
> confusing if not outright wrong.  Why was this change put in?

Actually, I'm not sure a change *was* put in! I haven't yet looked,
but it may be that this is a result of my adding a "number to text"
conversion function. The type conversion code took that and ran!

Remember that for v7.0, "length" for character strings should be
"char_length". Maybe some of the trouble here is from leftover
attempts to get strings and other "length" types to play together in
an underspecified query.
                     - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Peter Mount
Date:
Subject: JDBC 7.0 binaries
Next
From: Benjamin Adida
Date:
Subject: Re: Proposal: replace no-overwrite with Berkeley DB