Re: ecpg & host variables
От | Michael Meskes |
---|---|
Тема | Re: ecpg & host variables |
Дата | |
Msg-id | 20020720114528.GE1781@feivel.fam-meskes.de обсуждение исходный текст |
Ответ на | ecpg & host variables (Daniel Kelley <dkelley@otec.com>) |
Список | pgsql-interfaces |
On Fri, Jul 19, 2002 at 05:02:53PM -0400, Daniel Kelley wrote: > EXEC SQL BEGIN DECLARE SECTION; > typedef struct { > int id; > char name[30]; > char dsc[1000]; > } rec_t; > > rec_t r; > EXEC SQL END DECLARE SECTION; Actually this will not work, but you can do the following: EXEC SQL BEGIN DECLARE SECTION; struct { int id; char name[30]; char dsc[1000]; } r; EXEC SQL END DECLARE SECTION; or use the EXEC SQL TYPE command to do a typedef so ecpg knows about it: EXEC SQL TYPE rec_r is struct { int id; char name[30]; char dsc[1000]; } > is there are facility that i might be missing that would allow me to use > our existing structures as host variables w/ postgres embedded sql? or am > i better off just skipping ecpg and coding directly with libpq? That will be much more work. ecpg was modelled in a way that pro*c apps should compile without much of a problem. Michael -- Michael Meskes Michael@Fam-Meskes.De Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
В списке pgsql-interfaces по дате отправления: