From: | Bill West <bwest(at)egh(dot)csc(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | ecpg and varchar in struct? |
Date: | 2002-07-26 19:18:55 |
Message-ID: | 3D41A09F.AD59309F@egh.csc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Nelson Marisco | 2002-07-26 19:28:25 | Inquiry From Form [pgsql] |
Previous Message | Robert J. Sanford, Jr. | 2002-07-26 19:17:37 | Re: The best book |