ecpg seems to re-write
varchar name [maxsize]
as
struct {int len, char arr [maxsize]} name;
just fine when in an EXEC SQL DECLARE section. But it does not seem to
re-write it
when it is inside a struct definition that is processed via
EXEC SQL INCLUDE. It seems, instead, to define varchar as a different
object - with members '.vl_len' and '.vl_dat' instead of '.len' and
'.arr'?
Is this apparent inconsistency between varchar handling in DECLARE
versus INCLUDE
due to something I am doing wrong? In other words, is it true that ecpg
implements varchar
completely differently if it is instantiated by instantiating a
structure-containing-varchar,
versus if it is instantiated as an individually declared varchar?
The program in question was originally written for Oracle/ PRO-C and has
been in
production for years. PRO-C seems to re-write varchar at INCLUDE (layout
definition)
time as well as at DECLARE (instantiate an instance of the layout
definition) time
the same way.