RileyE
RileyE

Reputation: 11084

Using bigint in PostgreSQL and SQLite

How would I specify bigint in a create_table for PostgreSQL and SQLite in a rails schema file?

I've looked at the data types to see that there is a carry over between the two and checked their capacities here and here.

I then saw this question and I was wondering if there really wasn't any way to create the bigint inside the create_table schema.

Also, I am not necessarily looking for bigint, but rather an 64-bit datatype; signing doesn't matter (I will only be accessing the bits).

Upvotes: 0

Views: 917

Answers (1)

user80168
user80168

Reputation:

In PostgreSQL:

create table whatever ( some_column bigint );

That's all. But if you want bit operations, it's better to use dedicated data type - namely bit(n)

Upvotes: 1

Related Questions