Issue 127350

Summary: Table design: can't change length of Postgresql char types
Product: Base Reporter: damjan
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P5 (lowest) CC: oooforum
Version: 4.2.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description damjan 2017-03-08 18:30:17 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).
Comment 1 oooforum (fr) 2017-03-09 09:57:12 UTC
A long time ago, Joerg Budischewski has been worked on a specific driver:
http://www.openoffice.org/dba/drivers/postgresql/index.html
Comment 2 SVN Robot 2017-08-20 19:16:29 UTC
"damjan" committed SVN revision 1805579 into trunk:
#i127350# - Table design: can't change length of Postgresql char types