Re: ECPG and C++ compilation
От | Michael Meskes |
---|---|
Тема | Re: ECPG and C++ compilation |
Дата | |
Msg-id | 20030226153343.GA26887@feivel.fam-meskes.de обсуждение исходный текст |
Ответ на | Re: ECPG and C++ compilation (Matthew Vanecek <mevanecek@yahoo.com>) |
Список | pgsql-interfaces |
On Tue, Feb 25, 2003 at 02:44:45PM -0600, Matthew Vanecek wrote: > EXEC SQL BEGIN DECLARE SECTION; > struct s_somestruct { > int id; > char *field; > }; > > typedef struct s_somestruct SomeStruct; > EXEC SQL END DECLARE SECTION; Ah, now I understand. Yes, this is a long standing bug. Or make that a missing feature. The struct definition has to be listed inside the typedef. > Doing "typedef struct { /* stuff */ } AStruct;" appears to work with > ecpg from 7.3.2, but IIRC, it would not work in 7.2.3. I'm note sure what worked in 7.2.3. :-) > Is sizeof() a compile-time execution/calculation? If so, then it would AFAIK yes. > definitely not be portable, unless you implemented/used a generic types > library (such as glib, for example). Since it works in C, though, and > ECPG generates C, I'm by no means making a suggestion to follow this > path. ;) Michael -- Michael Meskes Email: Michael@Fam-Meskes.De ICQ: 179140304 Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
В списке pgsql-interfaces по дате отправления: