1

What is the default maximum character size limit of Char field with no specified size?

The field is created like this.

name = fields.Char(string='Name')

Odoo version 14, Community Edition

holydragon
  • 6,158
  • 6
  • 39
  • 62

1 Answers1

1

Odoo will use the pg_varchar function to return the VARCHAR declaration for the provided size. If no size (or an empty or negative size) is provided, it will return an infinite VARCHAR otherwise return a VARCHAR(n)

Odoo will not set the maximum size and the longest possible character string that can be stored in PostgreSQL is about 1GB

Kenly
  • 24,317
  • 7
  • 44
  • 60