I wrote:
I noticed this problem in 8.2 and 8.3:
pei=# select mod( trunc( 1 ), 2 );
ERROR: 42883: function mod(double precision, integer) does not exist
LINE 1: select mod( trunc( 1 ), 2 );
^
I suppose there will be little interest in including the obvious solution,
namely
Peter Eisentraut wrote:
I wrote:
I noticed this problem in 8.2 and 8.3:
pei=# select mod( trunc( 1 ), 2 );
ERROR: 42883: function mod(double precision, integer) does not exist
LINE 1: select mod( trunc( 1 ), 2 );
^
I suppose there will be little interest in including the
Peter Eisentraut wrote:
Am Mittwoch, 7. November 2007 schrieb Heikki Linnakangas:
Peter Eisentraut wrote:
I wrote:
I noticed this problem in 8.2 and 8.3:
pei=# select mod( trunc( 1 ), 2 );
ERROR: 42883: function mod(double precision, integer) does not exist
LINE 1: select
Peter Eisentraut [EMAIL PROTECTED] writes:
Am Mittwoch, 7. November 2007 schrieb Heikki Linnakangas:
Why would you run a query like that in the first place? It seems like a
useless query as it is. Is there a bigger story behind it?
The 1 is substituted from somewhere else.
Seems like textual
Am Mittwoch, 7. November 2007 schrieb Heikki Linnakangas:
Peter Eisentraut wrote:
I wrote:
I noticed this problem in 8.2 and 8.3:
pei=# select mod( trunc( 1 ), 2 );
ERROR: 42883: function mod(double precision, integer) does not exist
LINE 1: select mod( trunc( 1 ), 2 );
I noticed this problem in 8.2 and 8.3:
pei=# select mod( trunc( 1 ), 2 );
ERROR: 42883: function mod(double precision, integer) does not exist
LINE 1: select mod( trunc( 1 ), 2 );
^
It apparently casts the 1 to double precision to pick the variant
trunc(dp)=dp instead of
Am Dienstag, 6. November 2007 schrieb Peter Eisentraut:
I noticed this problem in 8.2 and 8.3:
pei=# select mod( trunc( 1 ), 2 );
ERROR: 42883: function mod(double precision, integer) does not exist
LINE 1: select mod( trunc( 1 ), 2 );
^
It apparently casts the 1 to double
--On Dienstag, November 06, 2007 16:31:05 +0100 Peter Eisentraut
[EMAIL PROTECTED] wrote:
I noticed this problem in 8.2 and 8.3:
pei=# select mod( trunc( 1 ), 2 );
ERROR: 42883: function mod(double precision, integer) does not exist
LINE 1: select mod( trunc( 1 ), 2 );
^
It
Peter Eisentraut [EMAIL PROTECTED] writes:
It apparently casts the 1 to double precision to pick the variant
trunc(dp)=dp instead of trunc(numeric)=numeric. I was under the impression
that we didn't want to cast integers to float types implicitly because this
loses information. Clearly, the
Tom Lane wrote:
Peter Eisentraut [EMAIL PROTECTED] writes:
It apparently casts the 1 to double precision to pick the variant
trunc(dp)=dp instead of trunc(numeric)=numeric. I was under the
impression that we didn't want to cast integers to float types
implicitly because this loses
Peter Eisentraut [EMAIL PROTECTED] writes:
The clarity stems from the fact that this is the variant that doesn't
lose data whereas the other one does.
I think double has a wider range. So you get a choice between losing precision
or not being able to store all values.
The expression I
11 matches
Mail list logo