ecpg and varchar in struct?

Поиск
Список
Период
Сортировка
От Bill West
Тема ecpg and varchar in struct?
Дата
Msg-id 3D41A09F.AD59309F@egh.csc.com
обсуждение исходный текст
Список 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.





В списке pgsql-general по дате отправления:

Предыдущее
От: stefan@extum.com
Дата:
Сообщение: pg_controldata question
Следующее
От: Nelson Marisco
Дата:
Сообщение: Inquiry From Form [pgsql]