I'm looking for an alternative to statically sized character arrays
E.g. exec sql select relname into :VAR from pg_classes;
It should (!) be possible to obtain this by using pointers which are
initialized to NULL.
It is possible for
reading an arbitrary number of integers into a malloced array
reading one arbitrary length string into a malloced character
But ecpg does not accept
Is there any way to specify arbitrary strings of any length ?
The code (execute.c:435) has also support for varchar - but how to
declare such a variable length varchar?
And the code (execute.c:432) multiplies the number of tuples with the
longest string. But how to use this code in real life?
Looks like dead code to me (hopefully I'm wrong)
PS: I'm willing to implement char**
(allocate tuples*sizeof(char*) + sum(length(tuple[n])+1) bytes,
fill the array with pointers,
fill the space behind the array with the actual data.
This means just one free get's it all.
But this code cannot be portable!)
pgsql-interfaces by date
|Next:||From: D'Arcy J.M. Cain||Date: 2001-10-24 12:04:44|
|Subject: Re: Python interface and Money?|
|Previous:||From: Bruce Momjian||Date: 2001-10-23 16:45:50|
|Subject: Re: ECPG - connection name in "EXEC SQL AT ... " statement|