Re: numeric hierarchy again (was Re: [HACKERS] floor function in 7.3b2)

2002-10-04 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Yes, I realize it is during parsing. I was just wondering if making > constants coming in from the parser NUMERIC is a performance hit? Offhand I don't see a reason to think that coercing to NUMERIC (and then something else) is slower than coercing to

Re: numeric hierarchy again (was Re: [HACKERS] floor function in 7.3b2)

2002-10-04 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Do we know that defaulting floating constants will not be a performance > > hit? > > Uh ... what's your concern exactly? The datatype coercion (if any) will > happen once at parse time, not at runtime. Yes, I realize it is during p

Re: numeric hierarchy again (was Re: [HACKERS] floor function in 7.3b2)

2002-10-04 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Do we know that defaulting floating constants will not be a performance > hit? Uh ... what's your concern exactly? The datatype coercion (if any) will happen once at parse time, not at runtime. regards, tom lane --

Re: numeric hierarchy again (was Re: [HACKERS] floor function in 7.3b2)

2002-10-04 Thread Bruce Momjian
Tom Lane wrote: > Moving to the left requires an explicit cast (or at least an assignment > to a column). I know this looks strange to someone who knows that our > numeric type beats float4/float8 on both range and precision, but it's > effectively mandated by the SQL spec. Any combination of "e

numeric hierarchy again (was Re: [HACKERS] floor function in 7.3b2)

2002-10-04 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Sorry, I missed much of the casting discussion -- but is there a > reason why we can't cast from float8 -> numeric implicitely? IIRC the > idea was to allow implicit casts from lower precision types to higher > precision ones. The implicit casting hierarc

Re: [HACKERS] floor function in 7.3b2

2002-10-03 Thread Neil Conway
Tom Lane <[EMAIL PROTECTED]> writes: > "Mario Weilguni" <[EMAIL PROTECTED]> writes: > > Why is floor not working anymore? > > Mph. Seems we have floor(numeric) but not floor(float8), and the latter > is what you need here. Sorry, I missed much of the casting discussion -- but is there a reason

Re: [HACKERS] floor function in 7.3b2

2002-10-03 Thread Bruce Momjian
Added to TODO: * Add floor(float8) and other missing functions --- Tom Lane wrote: > "Mario Weilguni" <[EMAIL PROTECTED]> writes: > > I noticed that some of my queries don't work anymore because they're using > > t

Re: [HACKERS] floor function in 7.3b2

2002-10-01 Thread Tom Lane
"Mario Weilguni" <[EMAIL PROTECTED]> writes: > I noticed that some of my queries don't work anymore because they're using > the floor function: > e.g.: select type, floor(date_part('epoch', dataend)) as ts from > last_modified > Why is floor not working anymore? Mph. Seems we have floor(numeric)

[HACKERS] floor function in 7.3b2

2002-10-01 Thread Mario Weilguni
I noticed that some of my queries don't work anymore because they're using the floor function: e.g.: select type, floor(date_part('epoch', dataend)) as ts from last_modified Why is floor not working anymore? I guess I can use round too, but I don't want to modify semantics. Regards, Mari