String lengths in the SQL backend

Braindead Braindead at
Thu Nov 13 10:01:44 EST 2008

On Wed, 12 Nov 2008 10:24:03 -0500 Phil Longstaff <plongstaff at> wrote:
> Rolf Leggewie has run into some problems with the SQL backend 
> ( - he wants to add
> another SQL table to key off the account 'code' field.  However, the
> 'code' field is varchar(2048) which is too big to be a primary key in
> mysql.  I responded that earlier discussion on this mailing list
> (mainly/only by Derek) had been that strings should be unlimited, and
> since SQL requires *some* limit, I chose 2048.
I wrote an interface between our application (POS system) and QuickBooks (very popular with our customers).  QB doesn't really have an account code field but here are some examples of limits:

Name: 31 chars
Account #: 7 chars <not sure what this one is for>
Bank Account #: 25 chars

More information about the gnucash-user mailing list