Open GitMensch opened 2 years ago
Rechecked: OCESQL uses the following:
#define OCDB_VARCHAR_HEADER_BYTE 4 // size of PIC S9(8) COMP-5`
So I do wonder: Shouldn't USE_VARLEN_32
be the default as long as there's a fixed varlen only?
So I do wonder: Shouldn't
USE_VARLEN_32
be the default as long as there's a fixed varlen only?
Yes, that's probably for the better, I'll add this to the next batch of fixes.
Should the "variable" support instead of GixSQL compile time be in the backlog or planned for a version? For now I have no need for it, just want to get some overview where GixSQL stands and what issues are "in progress".
This will be partially solved in v1.0.21dev (to be released in about a week). It will be possible to specify the size of the length indicator both during preprocessing and at runtime (with an environment variable). It is a stopgap but at least it allows for different indicator field sizes without having to recompile (or use a separate version of) GixSQL. This will be definitely fixed by adding a flag to the ones currently passed to define SQL parameters (along with type, size, etc.) but I don't know if it will be possible for v1.0.21 "final".
The size of sub-items to store the length of variable-length-fields can be currently chosen at compile-time like this:
https://github.com/mridoni/gixsql/blob/f28e208bea487b91c159ecd50023fe764bbb034b/libgixpp/TPESQLProcessing.cpp#L107-L120
The problem is that short/long field length indicators cannot be currently mixed, so in practice there is no difference between
VARCHAR
andLONG VARCHAR
, provided that you defineUSE_VARLEN_32
(except at declaration time, where I thinkLONG VARCHAR
is still not supported, so you have to use standardVARCHAR
).Originally posted by @mridoni in https://github.com/mridoni/gixsql/issues/38#issuecomment-1117389355
So things to do:
EXEX SQL VAR
and to use the 4byte type forVARYING
groups which extend the 2byte size