Before my change to 254 the value was 255. I guess it was "randomly" picked... I let you change to 320.
Jacques Adrian Crum wrote: > Yes, of course I read it all. I C&P it in my previous reply. Like I > said, I've written verification routines and I am intimately familiar > with this and other RFCs. > > It's not that your English is bad. The problem is you are ignoring the > first part. The word "However" does not mean the previous part is wrong. > It means the previous part is correct, HOWEVER... or BUT... > > The bottom line is this: A mail server might accept a 320 character long > email address - there is no law that it absolutely must follow RFCs. We > are not writing email server software here - we are simply storing an > email address. If the user says their 320 character email address works > for them, then why should we truncate it to 254 characters? If the user > made a mistake and provided an email address that is too long, then the > mail server will let them know - it's not the job of OFBiz to make that > decision. > > Adrian Crum > Sandglass Software > www.sandglass-software.com > > On 10/6/2013 3:42 PM, Jacques Le Roux wrote: >> Did you read all at bottom? >> >> This is the last errata on this subject. >> ========================================================================= >> Status: Verified >> Type: Technical >> >> Reported By: Dominic Sayers >> Date Reported: 2009-02-22 >> Verifier Name: Nevil Brownlee >> Date Verified: 2010-04-03 >> >> >> Section 3 says: >> >> (from erratum 1003) >> >> In addition to restrictions on syntax, there is a length limit on >> email addresses. That limit is a maximum of 64 characters (octets) >> in the "local part" (before the "@") and a maximum of 255 characters >> (octets) in the domain part (after the "@") for a total length of 320 >> characters. However, there is a restriction in RFC 2821 on the length of >> an >> address in MAIL and RCPT commands of 256 characters. Since addresses >> that do not fit in those fields are not normally useful, the upper >> limit on address lengths should normally be considered to be 256. >> It should say: >> >> In addition to restrictions on syntax, there is a length limit on >> email addresses. That limit is a maximum of 64 characters (octets) >> in the "local part" (before the "@") and a maximum of 255 characters >> (octets) in the domain part (after the "@") for a total length of 320 >> characters. However, there is a restriction in RFC 2821 on the length of >> an >> address in MAIL and RCPT commands of 254 characters. Since addresses >> that do not fit in those fields are not normally useful, the upper >> limit on address lengths should normally be considered to be 254. >> >> Notes: >> >> I believe erratum ID 1003 is slightly wrong. RFC 2821 places a 256 character >> limit on the forward-path. But a path is defined as >> >> Path = "<" [ A-d-l ":" ] Mailbox ">" >> >> So the forward-path will contain at least a pair of angle brackets in >> addition to the Mailbox. This limits the Mailbox (i.e. the >> email address) to 254 characters. >> >> ========================================================================= >> >> I know my English is limited, but the last sentence seems to keep telling me >> I'm right :p >> >> Jacques >> >> Adrian Crum wrote: >>> I keep trying to tell you it doesn't say that. You are reading it wrong. >>> >>> Errata ID: 1690: >>> >>> "In addition to restrictions on syntax, there is a length limit on >>> email addresses. That limit is a maximum of 64 characters (octets) >>> in the "local part" (before the "@") and a maximum of 255 characters >>> (octets) in the domain part (after the "@") for a total length of 320 >>> characters. However..." >>> >>> >>> Adrian Crum >>> Sandglass Software >>> www.sandglass-software.com >>> >>> On 10/6/2013 3:26 PM, Jacques Le Roux wrote: >>>> This is not what I read at the bottom of >>>> http://www.rfc-editor.org/errata_search.php?rfc=3696 where 254 is stated >>>> as the email >>>> address limit. >>>> >>>> Ho well, I can put 320 instead of 254... >>>> >>>> Other opinions? >>>> >>>> Jacques >>>> >>>> Adrian Crum wrote: >>>>> You are misunderstanding the errata. The document clearly states the >>>>> limit is 320 characters, HOWEVER some mail servers might not accommodate >>>>> that length in certain fields. Nowhere does the RFC state that 320 >>>>> characters is "wrong." >>>>> >>>>> If someone gives you an email address that is 320 characters long and it >>>>> works, are you going to argue with them? Even the individual who has >>>>> mounted the "320 CHARACTER LIMIT IS WRONG" crusade concedes that. >>>>> >>>>> And you are comparing apples with oranges. URLs do not have a length >>>>> limit, and email addresses do. >>>>> >>>>> Please don't do this. You are arguing against a field length that >>>>> doesn't cost us anything. >>>>> >>>>> Adrian Crum >>>>> Sandglass Software >>>>> www.sandglass-software.com >>>>> >>>>> On 10/6/2013 3:02 PM, Jacques Le Roux wrote: >>>>>> It seems to me that the should rather stick to the new standard which is >>>>>> clearly 254 chars for an email address. >>>>>> A complete email address is a SMTP path >>>>>> http://tools.ietf.org/html/rfc5321#section-4.5.3.1.3 so 256 chars less >>>>>> the 2 >>>>>> surrounding angle brackets. >>>>>> >>>>>> The other parts >>>>>> Local-part (64) >>>>>> @ (1) >>>>>> Domain (255) >>>>>> are limited by the whole >>>>>> >>>>>> This would avoid to accomodate future possible issues as you suggested >>>>>> below (so following Occam's_razor). This is the same >>>>>> than you did for the URLs. >>>>>> >>>>>> We could even guarantee that the the other parts lengths are respected >>>>>> (included in the whole) but that does not concern the >>>>>> DB. >>>>>> >>>>>> Jacques >>>>>> >>>>>> Adrian Crum wrote: >>>>>>> I've written internet address validation routines, and I know there are >>>>>>> conflicting or competing specifications. Email addresses are a perfect >>>>>>> example. >>>>>>> >>>>>>> The errata document makes some good points. My view of it all is to >>>>>>> follow the specification for a valid email address (64 + 1 + 255) and if >>>>>>> a server cannot accommodate it, it will reply with an error message and >>>>>>> the owner of the address can change it. >>>>>>> >>>>>>> Adrian Crum >>>>>>> Sandglass Software >>>>>>> www.sandglass-software.com >>>>>>> >>>>>>> On 10/6/2013 2:01 PM, Jacques Le Roux wrote: >>>>>>>> Please update your references, see the urls I posted below. I read >>>>>>>> there >>>>>>>> <<The original version of RFC 3696 did indeed say 320 was the maximum >>>>>>>> length, but John Klensin subsequently accepted this >>>>>>>> was WRONG.>> http://www.rfc-editor.org/errata_search.php?rfc=3696 >>>>>>>> >>>>>>>> Jacques >>>>>>>> >>>>>>>> Adrian Crum wrote: >>>>>>>>> Email addresses can be up to 320 characters long (64 + 1 + 255). >>>>>>>>> >>>>>>>>> Adrian Crum >>>>>>>>> Sandglass Software >>>>>>>>> www.sandglass-software.com >>>>>>>>> >>>>>>>>> On 10/6/2013 1:03 PM, [email protected] wrote: >>>>>>>>>> Author: jleroux >>>>>>>>>> Date: Sun Oct 6 20:03:12 2013 >>>>>>>>>> New Revision: 1529674 >>>>>>>>>> >>>>>>>>>> URL: http://svn.apache.org/r1529674 >>>>>>>>>> Log: >>>>>>>>>> Same restriction for email addresses than recently done for url. An >>>>>>>>>> email address is now definitively no more than 254 >>>>>>>>>> characters: https://en.wikipedia.org/wiki/Email_address#Syntax >>>>>>>>>> http://stackoverflow.com/questions/386294/what-is-the-maximum-length-of-a-valid-email-address#answer-574698 >>>>>>>>>> Also a CC number and date are respectively no more than 19 and 4 >>>>>>>>>> digits: https://en.wikipedia.org/wiki/ISO/IEC_7813 >>>>>>>>>> >>>>>>>>>> I decided to not limit the tel numbers (now 60 chars seems plenty >>>>>>>>>> enough), maybe someone will even needs to increase in a >>>>>>>>>> far future :) >>>>>>>>>> >>>>>>>>>> While at it, normalises fieldtypepostnew.xml: >>>>>>>>>> * Removes confusing comment in header >>>>>>>>>> * Restricts most types like in fieldtypepostgres.xml (no needs to >>>>>>>>>> have them longer), but keep unlimited (actually 2GB >>>>>>>>>> max): comment, description >>>>>>>>>> >>>>>>>>>> Modified: >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypeaxion.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypederby.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypefirebird.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypehsql.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypemssql.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypemysql.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypepostgres.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypepostnew.xml >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypesybase.xml >>>>>>>>>> >>>>>>>>>> Modified: ofbiz/trunk/framework/entity/fieldtype/fieldtypeaxion.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypeaxion.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypeaxion.xml (original) >>>>>>>>>> +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypeaxion.xml Sun Oct 6 >>>>>>>>>> 20:03:12 2013 @@ -52,9 +52,9 @@ under the License. >>>>>>>>>> <field-type-def type="value" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> Modified: ofbiz/trunk/framework/entity/fieldtype/fieldtypederby.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypederby.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypederby.xml (original) >>>>>>>>>> +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypederby.xml Sun Oct 6 >>>>>>>>>> 20:03:12 2013 @@ -52,9 +52,9 @@ under the License. >>>>>>>>>> <field-type-def type="value" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> Modified: >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypefirebird.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypefirebird.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypefirebird.xml >>>>>>>>>> (original) +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypefirebird.xml Sun Oct >>>>>>>>>> 6 20:03:12 2013 @@ -52,9 +52,9 @@ under the >>>>>>>>>> License. <field-type-def type="value" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> Modified: ofbiz/trunk/framework/entity/fieldtype/fieldtypehsql.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypehsql.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypehsql.xml (original) >>>>>>>>>> +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypehsql.xml Sun Oct 6 >>>>>>>>>> 20:03:12 2013 @@ -52,9 +52,9 @@ under the License. >>>>>>>>>> <field-type-def type="value" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> Modified: ofbiz/trunk/framework/entity/fieldtype/fieldtypemssql.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypemssql.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypemssql.xml (original) >>>>>>>>>> +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypemssql.xml Sun Oct 6 >>>>>>>>>> 20:03:12 2013 @@ -52,9 +52,9 @@ under the License. >>>>>>>>>> <field-type-def type="value" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> Modified: ofbiz/trunk/framework/entity/fieldtype/fieldtypemysql.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypemysql.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypemysql.xml (original) >>>>>>>>>> +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypemysql.xml Sun Oct 6 >>>>>>>>>> 20:03:12 2013 @@ -52,9 +52,9 @@ under the License. >>>>>>>>>> <field-type-def type="value" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> Modified: >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypepostgres.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypepostgres.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypepostgres.xml >>>>>>>>>> (original) +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypepostgres.xml Sun Oct >>>>>>>>>> 6 20:03:12 2013 @@ -52,9 +52,9 @@ under the >>>>>>>>>> License. <field-type-def type="value" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> Modified: ofbiz/trunk/framework/entity/fieldtype/fieldtypepostnew.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypepostnew.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypepostnew.xml >>>>>>>>>> (original) +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypepostnew.xml Sun Oct >>>>>>>>>> 6 20:03:12 2013 @@ -18,37 +18,6 @@ specific language >>>>>>>>>> governing permissions under the License. >>>>>>>>>> --> >>>>>>>>>> >>>>>>>>>> -<!-- >>>>>>>>>> - NOTE:: this is a new field type file for PostgreSQL, It has >>>>>>>>>> ONLY been >>>>>>>>>> - tested on a new install (hence the name >>>>>>>>>> fieldtypepostnew.xml) >>>>>>>>>> - so until you (or someone) tests this on upgrage it should >>>>>>>>>> ONLY >>>>>>>>>> - be used for new installation. >>>>>>>>>> - >>>>>>>>>> - This fieldtype file uses TEXT for ALL VARCHAR type fields, per >>>>>>>>>> a tip in >>>>>>>>>> - the PostgreSQL manual: >>>>>>>>>> - >>>>>>>>>> - Tip: There are no performance differences between these >>>>>>>>>> three >>>>>>>>>> - types, apart from the increased storage size when using the >>>>>>>>>> - blank-padded type. While character(n) has performance >>>>>>>>>> advantages >>>>>>>>>> - in some other database systems, it has no such advantages in >>>>>>>>>> - PostgreSQL. In most situations text or character varying >>>>>>>>>> - should be used instead. >>>>>>>>>> - >>>>>>>>>> - (Section 8.3. Character Types from the PostgreSQL 8.1 manual) >>>>>>>>>> - >>>>>>>>>> - Therefore this fieldtype file uses TEXT for all of the VARCHAR >>>>>>>>>> types, this >>>>>>>>>> - will mean that data for a OfBiz system that uses this file MAY >>>>>>>>>> NOT be able >>>>>>>>>> - to load on a system that uses any of the other filetype files >>>>>>>>>> (well I have >>>>>>>>>> - not looked at ALL of them but the ones I looked at will not be >>>>>>>>>> able to load >>>>>>>>>> - the data). >>>>>>>>>> - >>>>>>>>>> - This has the other advantage that the java type matches the sql >>>>>>>>>> type or at >>>>>>>>>> - least the DB can store anything that java can store (TEXT in >>>>>>>>>> PostgreSQL >>>>>>>>>> - can go to 2 Gig) >>>>>>>>>> - >>>>>>>>>> - Indicator is still a CHAR(1). >>>>>>>>>> ---> >>>>>>>>>> - >>>>>>>>>> <fieldtypemodel >>>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>>>> >>>>>>>>>> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/fieldtypemodel.xsd"> >>>>>>>>>> <!-- ===================== field-type-def >>>>>>>>>> ==================== --> >>>>>>>>>> @@ -67,28 +36,28 @@ under the License. >>>>>>>>>> <field-type-def type="floating-point" sql-type="FLOAT8" >>>>>>>>>> java-type="Double"/> >>>>>>>>>> <field-type-def type="numeric" sql-type="NUMERIC(20,0)" >>>>>>>>>> java-type="Long"/> >>>>>>>>>> >>>>>>>>>> - <field-type-def type="id" sql-type="TEXT" java-type="String"/> >>>>>>>>>> - <field-type-def type="id-long" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="id-vlong" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - >>>>>>>>>> + <field-type-def type="id" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="id-long" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="id-vlong" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + >>>>>>>>>> <field-type-def type="indicator" sql-type="CHAR(1)" >>>>>>>>>> sql-type-alias="BPCHAR" java-type="String"/> >>>>>>>>>> - <field-type-def type="very-short" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="short-varchar" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="long-varchar" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="very-short" sql-type="VARCHAR(10)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="short-varchar" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <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="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="description" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="name" sql-type="TEXT" java-type="String"/> >>>>>>>>>> - <field-type-def type="value" 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"/> >>>>>>>>>> + >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="url" sql-type="TEXT" java-type="String"/> >>>>>>>>>> - <field-type-def type="id-ne" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="id-long-ne" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="id-vlong-ne" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="tel-number" sql-type="TEXT" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="tel-number" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> </fieldtypemodel> >>>>>>>>>> >>>>>>>>>> Modified: ofbiz/trunk/framework/entity/fieldtype/fieldtypesybase.xml >>>>>>>>>> URL: >>>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/fieldtype/fieldtypesybase.xml?rev=1529674&r1=1529673&r2=1529674&view=diff >>>>>>>>>> ============================================================================== >>>>>>>>>> --- >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypesybase.xml >>>>>>>>>> (original) +++ >>>>>>>>>> ofbiz/trunk/framework/entity/fieldtype/fieldtypesybase.xml Sun Oct >>>>>>>>>> 6 20:03:12 2013 @@ -52,9 +52,9 @@ under the License. >>>>>>>>>> <field-type-def type="value" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> >>>>>>>>>> <!-- Specialized Types --> >>>>>>>>>> - <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(255)" java-type="String"/> >>>>>>>>>> - <field-type-def type="credit-card-date" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> - <field-type-def type="email" sql-type="VARCHAR(255)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-number" >>>>>>>>>> sql-type="VARCHAR(19)" java-type="String"/> >>>>>>>>>> + <field-type-def type="credit-card-date" sql-type="VARCHAR(4)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> + <field-type-def type="email" sql-type="VARCHAR(254)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="url" sql-type="VARCHAR(2000)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)" >>>>>>>>>> java-type="String"/> >>>>>>>>>> <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" >>>>>>>>>> java-type="String"/>
