[all] : diff between field type of id and max_value of their sequence

Bug #1278499 reported by Stephane SALAH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

Explication by sample :
Tres_partner :
\d res_partner
          Column | Type | Modifiers
--------------------------+-----------------------------+----------------------------------------------------------
 id | integer | not null default nextval('res_partner_id_seq'::regclass)

....

\d res_partner_id_seq

    Column | Type | Value
---------------+---------+---------------------
 sequence_name | name | res_partner_id_seq
 last_value | bigint | 71
 start_value | bigint | 1
 increment_by | bigint | 1
 max_value | bigint | 9223372036854775807
 min_value | bigint | 1
 cache_value | bigint | 1
 log_cnt | bigint | 30
 is_cycled | boolean | f
 is_called | boolean | t

Two solutions :
  - Change "id" type of fields to bigserial or bigint (prefered)
   - adapt max_value of their sequence

Preventive action, adapt for each type of fields max_value of their sequence

This probleme should be encounter on table with lots of line, (stock_move or account_move_line, etc...) on Ebusiness project.

On our projet case, it was only a table which received daylies informations with flush at each time.

Our solution was to replace the sequence by a cycling sequence (can this option be call on fields declaration or object declaration ?)

Thanks for all

Stephane

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.