Apache OpenOffice (AOO) Bugzilla – Issue 127350
Table design: can't change length of Postgresql char types
Last modified: 2017-08-20 19:16:29 UTC
Connect to a Postgresql server using its JDBC driver and the usual URL of the form "jdbc:postgresql://127.0.0.1/database". In "Tables", "Create Table in Design View..." Try create a column of type "Text [varchar]", and "Length" will be frozen at 10485760. Try create a column of type "Text (fix) [char]", and "Length" won't even appear. Problem is the method OFieldDescControl::DisplayData() in main/dbaccess/source/ui/control/FieldDescControl.cxx, which will deactivate the tpTextLen if pFieldType->nPrecision is 0, which it is for "Text (fix) [char]", and which will call pTextLen->SetSpecialReadOnly(true) when pFieldType->aCreateParams.getLength() is 0, which it is for "Text [varchar]". It is possible to hack this method, but that will affect all databases. We should rather make a Postgresql driver under main/connectivity/source/drivers that implements such fixes for Postgresql only (like we already have for several other databases).
A long time ago, Joerg Budischewski has been worked on a specific driver: http://www.openoffice.org/dba/drivers/postgresql/index.html
"damjan" committed SVN revision 1805579 into trunk: #i127350# - Table design: can't change length of Postgresql char types