help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Error literal string too long in TABLE statement


From: Andrew Makhorin
Subject: Re: [Help-glpk] Error literal string too long in TABLE statement
Date: Mon, 20 Feb 2012 21:11:12 +0300

> I agree that 100 characters is probably reasonable for variable names 
> and other uses of the strings.  However, for the table statement it is 
> much too short.   It appears that there are two remedial actions possible:
> 
> 1) change the limit for every data structure to say 2048, advantage is 
> the simplicity of change but wasteful for most uses of the data structure
> 2) introduce a new data structure and limit for the table string only, 
> size 2048.   Efficient in memory but all the coding with respect to 
> parsing and error reporting then has to be adapted for the two data 
> structures.
> 

Thank you for your suggestion. The only thing that needs to be
reimplemented is evaluation of symbolic operands specified in the table
statement.

> While neither method is perfect, approach 1 seems much simpler to 
> execute.  Just leaving 100 characters for an SQL query is not usable in 
> practice.  

You can split long queries as explained in:
http://en.wikibooks.org/wiki/GLPK/ODBC#100_character_limitation

> What is the memory penalty for the first method?
> 

Hard to say, because a brute force implementation would depend on
implementation of malloc.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]