INT8 in Postgres

Started by Dr. Evilover 24 years ago4 messagesgeneral
Jump to latest
#1Dr. Evil
drevil@sidereal.kz

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

#2Dr. Evil
drevil@sidereal.kz
In reply to: Dr. Evil (#1)
Re: INT8 in Postgres

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

#3Thomas Lockhart
lockhart@fourpalms.org
In reply to: Dr. Evil (#1)
Re: Re: INT8 in Postgres

But I am still wondering: Is INT8 a good datatype to use?

Sure.

- Thomas

#4Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Dr. Evil (#1)
Re: INT8 in Postgres

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.