2pack: column size for SQL statement shall be extended

Description

For a plugin I need to provide a database function. Its size is about 3000 characters. Even trying to 'compress' it by taking out comments leaves a size of about 2500 characters.

The column is currently of size memo and as implied by the description "limited to 2000 characters".

From a quick look into the sources it seems to me that all text type columns other than text long (which becomes a BLOB) are created as VARCHAR2. So my proposal is to keep it as memo and just extend it to 4000 chars.

WDYT?

Regards,

Dirk Niemeyer

Environment

None

Activity

Show:
Hiep Lq
December 25, 2015, 2:42 PM

other issue. current ad_changelog.newvalue and ad_changelog.oldvalue is character varying(2000).
so value from text long or text with length great than 2000 will be truncate

Hiep Lq
December 25, 2015, 4:58 PM

this is query for list column i modified

Hiep Lq
December 26, 2015, 6:25 AM

idempiere treat clob (text) as binary (Blob). now pack-in, pack-out don't work for blob.
i think clob should treat as String, same jdbc also treat clob as string.

Carlos Ruiz
August 1, 2016, 1:21 PM
Hiep Lq
August 1, 2016, 2:45 PM

i remember we discuss about it before but can't find it out to re-test.
thanks for re-clear it.

just summary my test.

c_order.description column on postgresql:

1. choose type = string and length = 10000
database: datatype is character varying(10000)
pack-in like a normal string
2. choose type = text => have to define length, and length = 10000
database: datatype is text
pack-in like a normal string
3. choose type = text long => not need define length
database: datatype is text
pack-in like a binary

before maybe i do something wrong, so can't play with string and text long

from document of postgresql: https://www.postgresql.org/docs/9.1/static/datatype-character.html

so separate type of string to (string, text, text long) is for compatible with oracle isn't mandatory for postgresql

Assignee

Hiep Lq

Reporter

Dirk Niemeyer

Labels

Tested By

None

Components

Affects versions

Priority

Major
Configure