We use a bigint on a View (table_query) as Id.
In postgres
Max integer 2147483647
Max bigint 9223372036854775807
We use Ids that are bigger than 2147 million for views (group by). We compose more than one Id by shifting (mulliply) by max number or rows expected and add ids. This calculated Ids are bigger than Max integer (they are bigint). Using this calculated Ids is the only way that we found to make views fast in Tryton. The Id is calculated and maintained in the table that is queried in the view group by. The calculated Id is indexed.
Everything seems to works fine with bigint.
Should we be worried of an unforeseen problem for using bigint instead of integer for the Id?
Could we have done something better/different with the Id of the view?
Can we change an Id to bigint in a table “of a Model” and everything will keep working fine?