Thread: INT8 in Postgres

INT8 in Postgres

From
"Dr. Evil"
Date:
Is the INT8 datatype well supported in PG?  I was just trying to do a
TO_CHAR(INT8...) and it said that there is no INT8 version of
TO_CHAR.  Also I think I saw on the list here that you can't index on
INT8.  I'm considering using INT8 all over the place in my
application, because I need ints with up to 14 digits or so.  Is this
a mistake?  Should I use some other datatype?  And how do I convert
INT8 to a string?

Thanks

Re: INT8 in Postgres

From
"Dr. Evil"
Date:
Ah, never mind that last one... I was calling TO_CHAR incorrectly.
But I am still wondering: Is INT8 a good datatype to use?

Re: Re: INT8 in Postgres

From
Thomas Lockhart
Date:
> But I am still wondering: Is INT8 a good datatype to use?

Sure.

                    - Thomas

Re: INT8 in Postgres

From
Stephan Szabo
Date:
On 11 Aug 2001, Dr. Evil wrote:

>
> Is the INT8 datatype well supported in PG?  I was just trying to do a
> TO_CHAR(INT8...) and it said that there is no INT8 version of
> TO_CHAR.  Also I think I saw on the list here that you can't index on
> INT8.  I'm considering using INT8 all over the place in my
> application, because I need ints with up to 14 digits or so.  Is this
> a mistake?  Should I use some other datatype?  And how do I convert
> INT8 to a string?

You answered the to_char thing it looks like...

For indexing, you can do it, you just need to be careful to either
quote or explicitly cast a constant into int8 in order for the
index to get used.