

Einar Karttunen wrote:

>
> >
> > integer (float_expression) or int (float_expression) DO work on
> RedHat6.2/PostgreSQL6.5 and DO NOT work on Mandrake/PostgreSQL7.0.2

> Try using int2()/int4()/int8() instead of integer(). The intn()
functions
> convert the float to a integer n bytes long, in normal cases you
probably
> want to use int4().
>

Einar,

Much obliged.

int4() has done a job.

Why is that NOT documented under "Matematical functions"?

Regards,


Steven.

--
***********************************************

Steven Vajdic (BSc/Hon, MSc)
Senior Software Engineer
Motorola Australia Software Centre (MASC)
2 Second Avenue, Technology Park
Adelaide, South Australia  5095
email:  Steven.Vajdic@motorola.com
email:  svajdic@asc.corp.mot.com
Ph.:  +61-8-8168-3435
Fax:    +61-8-8168-3501
Front Office (Ph): +61-8-8168-3500

----------------------------------------
mobile: +61 (0)419 860 903
AFTER WORK email:  steven_vajdic@ivillage.com
----------------------------------------

***********************************************



Fri, 06 Apr 2001 18:57:16 +0930
Steven Vajdic <svajdic@asc.corp.mot.com>
Integer to float function
> > > integer (float_expression) or int (float_expression) DO work on
> > RedHat6.2/PostgreSQL6.5 and DO NOT work on Mandrake/PostgreSQL7.0.2
> > Try using int2()/int4()/int8() instead of integer().
> Why is that NOT documented under "Matematical functions"?

Because we haven't received any patches to document it? ;)

                     - Thomas

Fri, 06 Apr 2001 13:46:22 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: Integer to float function
Steven Vajdic writes:

> int4() has done a job.
>
> Why is that NOT documented under "Matematical functions"?

Because you're supposed to use CAST(value AS integer).

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Fri, 6 Apr 2001 16:39:22 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: Integer to float function
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> Try using int2()/int4()/int8() instead of integer().
>> Why is that NOT documented under "Matematical functions"?

> Because we haven't received any patches to document it? ;)

Or because it's not a mathematical function.  I don't think that
datatype conversion functions belong under that heading.

			regards, tom lane

Fri, 06 Apr 2001 10:54:49 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: Integer to float function 