Issue 127350 - Table design: can't change length of Postgresql char types
Summary: Table design: can't change length of Postgresql char types
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-08 18:30 UTC by damjan
Modified: 2017-08-20 19:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
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