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
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 lik
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
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 obvio
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,
nam
"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
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
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. Clearl
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
--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
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 trunc(n
11 matches
Mail list logo