
  Hello,

   I'm looking for a int8-like type or equivalent substitute.

   float8 is the first one that comes to mind, but a question arises :
  isn't there a chance that if I store float8 values be integers, it may
on some occasions return to me a decimal ? I.e. I would store something
like
 2814749767106569
and on retrieval it would return something like
 2814749767106568.999999999998 instead of 2814749767106569 ?

   If there is such danger, what other suitable 8 byte data type (other
than char(8)) would there be in PG to give me the ablility to store
integers > 2^32 ?

  Or is it quite fast, easy, simple and performance-effective to add my
own 'int8' data type ?

    Thanx,

      Jan


 -- Gospel of Jesus is the saving power of God for all who believe --
                ## To some, nothing is impossible. ##
                   http://Vicherek.Waterloo.on.ca/


Sun, 27 Dec 1998 13:29:23 -0500 (EST)
Jan Vicherek <honza@ied.com>
int8 type substitute ?

/me goes red in face. 10 seconds after I sent this off I found
contrib/int8. That would answer one of my questions -- I.e. it would be
reasonably simple to add my own data type. If somebody feels like
answering the other questions too, please go ahead.

   Jan

On Sun, 27 Dec 1998, Jan Vicherek wrote:

> 
>   Hello,
> 
>    I'm looking for a int8-like type or equivalent substitute.
> 
>    float8 is the first one that comes to mind, but a question arises :
>   isn't there a chance that if I store float8 values be integers, it may
> on some occasions return to me a decimal ? I.e. I would store something
> like
>  2814749767106569
> and on retrieval it would return something like
>  2814749767106568.999999999998 instead of 2814749767106569 ?
> 
>    If there is such danger, what other suitable 8 byte data type (other
> than char(8)) would there be in PG to give me the ablility to store
> integers > 2^32 ?
> 
>   Or is it quite fast, easy, simple and performance-effective to add my
> own 'int8' data type ?
> 
>     Thanx,
> 
>       Jan
> 
> 
>  -- Gospel of Jesus is the saving power of God for all who believe --
>                 ## To some, nothing is impossible. ##
>                    http://Vicherek.Waterloo.on.ca/
> 
> 

 -- Gospel of Jesus is the saving power of God for all who believe --
                ## To some, nothing is impossible. ##
                   http://Vicherek.Waterloo.on.ca/


Sun, 27 Dec 1998 13:35:35 -0500 (EST)
Jan Vicherek <honza@ied.com>
Re: int8 type substitute ?
> 
> /me goes red in face. 10 seconds after I sent this off I found
> contrib/int8. That would answer one of my questions -- I.e. it would be
> reasonably simple to add my own data type. If somebody feels like
> answering the other questions too, please go ahead.
> 
>    Jan

6.4.* already has int8 support included, if your compiler supports it. 
When you run configure, it checks to see if 'long long' is int8, and if
so, enables int8 data types.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 27 Dec 1998 14:17:15 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Re: int8 type substitute ?