GDA save missing records

Phil Longstaff plongstaff at
Sun Feb 17 13:06:09 EST 2008

Derek Atkins wrote:
> Mark Johnson <mrj001 at> writes:
>> Mark Johnson wrote:
>>> This appears to be separate from the SERIAL problem of libgda's 
>>> PostgreSQL provider as PostgreSQL has the highest number of splits.  
>>> (Most complete?  Are there duplicates?)
>> Oops, no it doesn't have the highest number of splits.  It is three less 
>> than MySql.  Naturally, I should not expect duplicate records - the 
>> primary key should prevent this.
>> By comparing the splits in the PostgreSQL DB to the MySQL DB, I found 
>> that three were missing from the PostgreSQL copy.  By searching the 
>> PostgreSQL log file for errors inserting those guids, I found that, in 
>> all three instances, I had entered text for the memo field that was 
>> longer than the 50 characters allowed (by the DB schema).  PostgreSQL 
>> responded by refusing to enter that record.  MySQL simply truncated the 
>> data.
>> So how many characters are allowed in a memo field?
> All text fields are "unlimited".  This includes the description, the
> memo, the action, the number column, etc.

I am currently storing them as VARCHAR(n) fields where I just picked a 
value of n (50 or 100 in most cases).  For the XML backend, there is no 
problem storing an arbitrary-length string.  With a DB, mysql has 
TINYTEXT/TEXT/MEDIUMTEXT/LONGTEXT which are stored as a 1/2/3/4 
(respectively) byte length field followed by the string.  Postgres has 
TEXT for arbitrary-length strings.   It looks as though sqlite strings 
are arbitrary-length.

Do we really want "unlimited"?  I've alluded to this question in the 
past, but I don't know if there's been a definitive answer.


More information about the gnucash-devel mailing list