:)
No problem. Obviously, i don't always respond to email right away either :)
Since this email is long, I figured I should send it to you direct instead of
sending it to the list.
Anyway, this is what I was thinking:
diff --git a/framework/entity/fieldtype/fieldtypeadvantage.xml
b/framework/entity/fieldtype/fieldtypeadvantage.xml
index 9f81c3ec42..c7fd6910fa 100644
--- a/framework/entity/fieldtype/fieldtypeadvantage.xml
+++ b/framework/entity/fieldtype/fieldtypeadvantage.xml
@@ -50,8 +50,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="Char(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="Memo" java-type="String"/>
- <field-type-def type="comment" sql-type="Char(255)" java-type="String"/>
- <field-type-def type="description" sql-type="Char(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="Memo" java-type="String"/>
+ <field-type-def type="description" sql-type="Memo" java-type="String"/>
<field-type-def type="name" sql-type="Char(100)" java-type="String"/>
<field-type-def type="value" sql-type="Char(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypeaxion.xml b/framework/entity/fieldtype/fieldtypeaxion.xml
index 2ce5f3b13e..bc9cd405f8 100644
--- a/framework/entity/fieldtype/fieldtypeaxion.xml
+++ b/framework/entity/fieldtype/fieldtypeaxion.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="CLOB" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="CLOB" java-type="String"/>
+ <field-type-def type="description" sql-type="CLOB" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypedaffodil.xml b/framework/entity/fieldtype/fieldtypedaffodil.xml
index 8abda563f6..5a43a1e44b 100644
--- a/framework/entity/fieldtype/fieldtypedaffodil.xml
+++ b/framework/entity/fieldtype/fieldtypedaffodil.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR2(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="CLOB" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR2(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR2(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="CLOB" java-type="String"/>
+ <field-type-def type="description" sql-type="CLOB" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR2(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR2(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypederby.xml b/framework/entity/fieldtype/fieldtypederby.xml
index 80d2cfed14..d7aa9f7e45 100644
--- a/framework/entity/fieldtype/fieldtypederby.xml
+++ b/framework/entity/fieldtype/fieldtypederby.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="CLOB" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="CLOB" java-type="String"/>
+ <field-type-def type="description" sql-type="CLOB" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypefirebird.xml b/framework/entity/fieldtype/fieldtypefirebird.xml
index d449c1c4a9..191ef84c22 100644
--- a/framework/entity/fieldtype/fieldtypefirebird.xml
+++ b/framework/entity/fieldtype/fieldtypefirebird.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="BLOB SUB_TYPE 1"
java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="BLOB SUB_TYPE 1"
java-type="String"/>
+ <field-type-def type="description" sql-type="BLOB SUB_TYPE 1"
java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypehsql.xml b/framework/entity/fieldtype/fieldtypehsql.xml
index fe96fff90a..3c72490ac9 100644
--- a/framework/entity/fieldtype/fieldtypehsql.xml
+++ b/framework/entity/fieldtype/fieldtypehsql.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="CLOB" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="CLOB" java-type="String"/>
+ <field-type-def type="description" sql-type="CLOB" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypemssql.xml b/framework/entity/fieldtype/fieldtypemssql.xml
index 25e2d05199..88a69be1ef 100644
--- a/framework/entity/fieldtype/fieldtypemssql.xml
+++ b/framework/entity/fieldtype/fieldtypemssql.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="TEXT" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="TEXT" java-type="String"/>
+ <field-type-def type="description" sql-type="TEXT" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypemysql.xml b/framework/entity/fieldtype/fieldtypemysql.xml
index beb9fa36d3..2f07bff189 100644
--- a/framework/entity/fieldtype/fieldtypemysql.xml
+++ b/framework/entity/fieldtype/fieldtypemysql.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="LONGTEXT" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="LONGTEXT" java-type="String"/>
+ <field-type-def type="description" sql-type="LONGTEXT" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypeoracle.xml b/framework/entity/fieldtype/fieldtypeoracle.xml
index 03e66ab9fe..394951a0a4 100644
--- a/framework/entity/fieldtype/fieldtypeoracle.xml
+++ b/framework/entity/fieldtype/fieldtypeoracle.xml
@@ -60,8 +60,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR2(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="CLOB" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR2(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR2(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="CLOB" java-type="String"/>
+ <field-type-def type="description" sql-type="CLOB" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR2(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR2(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypepostgres.xml b/framework/entity/fieldtype/fieldtypepostgres.xml
index 8cb243e068..3e3555a5c1 100644
--- a/framework/entity/fieldtype/fieldtypepostgres.xml
+++ b/framework/entity/fieldtype/fieldtypepostgres.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="TEXT" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="TEXT" java-type="String"/>
+ <field-type-def type="description" sql-type="TEXT" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypesapdb.xml b/framework/entity/fieldtype/fieldtypesapdb.xml
index d10aea3532..2b44d60d93 100644
--- a/framework/entity/fieldtype/fieldtypesapdb.xml
+++ b/framework/entity/fieldtype/fieldtypesapdb.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255) UNICODE"
sql-type-alias="VARCHAR() UNICODE" java-type="String"/>
<field-type-def type="very-long" sql-type="LONG UNICODE" sql-type-alias="LONG UNICODE"
java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255) UNICODE" sql-type-alias="VARCHAR()
UNICODE" java-type="String"/>
+ <field-type-def type="comment" sql-type="LONG UNICODE" sql-type-alias="VARCHAR()
UNICODE" java-type="String"/>
+ <field-type-def type="description" sql-type="LONG UNICODE" sql-type-alias="VARCHAR()
UNICODE" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100) UNICODE" sql-type-alias="VARCHAR()
UNICODE" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255) UNICODE" sql-type-alias="VARCHAR()
UNICODE" java-type="String"/>
diff --git a/framework/entity/fieldtype/fieldtypesybase.xml b/framework/entity/fieldtype/fieldtypesybase.xml
index e61cd84689..5cd0231081 100644
--- a/framework/entity/fieldtype/fieldtypesybase.xml
+++ b/framework/entity/fieldtype/fieldtypesybase.xml
@@ -46,8 +46,8 @@ under the License.
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="very-long" sql-type="TEXT" java-type="String"/>
- <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"/>
- <field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
+ <field-type-def type="comment" sql-type="TEXT" java-type="String"/>
+ <field-type-def type="description" sql-type="TEXT" java-type="String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"/>
________________________________________
From: Jacques Le Roux [jacques.le.r...@les7arts.com]
Sent: Tuesday, September 08, 2020 4:34 AM
To:dev@ofbiz.apache.org
Subject: Re: varchar(255) in fieldtypepostgres.xml
Hi Development (is that a real name? :D),
Sorry for the late reply, sure please do. Before: you want to change it where?
In entityengine.xml I guess. If you want to put more information you
might look at entity-engine.adoc
Thanks
Jacques
Le 03/09/2020 à 18:36, Development a écrit :
Thanks for the reply. The link essentially says "to make postgres consistent with the other
databases". I researched it out, and found that *every single* supported database has a text
type that goes over 255 char! (and gets used for type "very-long")
I know I do, and I would imagine people could easily go over 255 char when writing things
like a comment or description about something. Would it make sense to change description
and comment field types for all databases to be whatever that database has for type
"very-long"? If so, do I submit this as a JIRA issue?
________________________________________
From: Jacques Le Roux [jacques.le.r...@les7arts.com]
Sent: Tuesday, August 11, 2020 6:30 AM
To:dev@ofbiz.apache.org
Subject: Re: varchar(255) in fieldtypepostgres.xml
Hi,
Please checkhttps://svn.apache.org/viewvc?view=revision&revision=1697590
This is also relatedhttps://markmail.org/message/xuwhnbmum3evejwk
Jacques
Le 10/08/2020 à 20:30, Development a écrit :
In /framework/entity/fieldtype/fieldtypepostgres.xml I saw some lines like:
<field-type-def type="comment" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="description" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="long-varchar" sql-type="VARCHAR(255)"
java-type="String"/>
In postgres, using "VARCHAR(255)" saves no space in the database over using "VARCHAR"
(with no number) or "TEXT", the only difference is that the 255 slows it down with error checking.
Is there any reason on the ofbiz side to not just change this to plain "VARCHAR" or
"TEXT"? Like perhaps the forms would only display the first 255 characters of it or
something?
Obviously I can do this for my own installation. I'm asking here cause it
feels like something that should be pushed upstream.
CONFIDENTIALITY NOTICE: This message is intended only for the use of the person
or organization to which it is addressed or was intended to be addressed, and
may contain information that is privileged, confidential and exempt from
disclosure under applicable law. If the reader of this message is not the
intended recipient, or responsible for delivering the message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by email and
delete the original message immediately . The sender, its subsidiaries and
affiliates, do not accept liability for any errors, omissions, corruption or
virus in the contents of this message or any attachments that arise as a result
of e-mail transmission. Thank you.
CONFIDENTIALITY NOTICE: This message is intended only for the use of the person
or organization to which it is addressed or was intended to be addressed, and
may contain information that is privileged, confidential and exempt from
disclosure under applicable law. If the reader of this message is not the
intended recipient, or responsible for delivering the message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by email and
delete the original message immediately . The sender, its subsidiaries and
affiliates, do not accept liability for any errors, omissions, corruption or
virus in the contents of this message or any attachments that arise as a result
of e-mail transmission. Thank you.
CONFIDENTIALITY NOTICE: This message is intended only for the use of the person
or organization to which it is addressed or was intended to be addressed, and
may contain information that is privileged, confidential and exempt from
disclosure under applicable law. If the reader of this message is not the
intended recipient, or responsible for delivering the message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by email and
delete the original message immediately . The sender, its subsidiaries and
affiliates, do not accept liability for any errors, omissions, corruption or
virus in the contents of this message or any attachments that arise as a result
of e-mail transmission. Thank you.