Re: [GENERAL] ECPG selecting into char arrays

2011-05-19 Thread Bosco Rama
Leif Jensen wrote: > > With that note in mind, how do I select from a table field of type 'text' ? If the type is text and you have no idea how long it will be have ecpg/libpq allocate a buffer for you by using a pointer set to NULL as the variable: exec sql char *val = NULL; /* Use an

[GENERAL] ECPG selecting into char arrays

2011-05-19 Thread Leif Jensen
Hi guys, In version 8.2 of the ECPG documentation, section "31.6.3. Different types of host variables" has been added and includes the following (new) note: 'Note that you have to take care of the length for yourself. If you use this host variable as the target variable of a query which r