Hi Michael,
The problem of offsets seems to be universal. If there is a structure
within structure. The offset to the members of inner structure should be
the size of the outer structure and not size of inner structure. Applying
this rule recursively, offset to the member of any nested structure,
On Wed, Apr 02, 2014 at 09:33:15AM +0530, Ashutosh Bapat wrote:
So, you are saying that we should try to catch such errors and report
during pre-compile time. That's better than silently corrupting the data.
Well, I think this goes without saying.
Michael
--
Michael Meskes
Michael at
I have one more doubt, regarding offsets.
In ECPGdump_a_simple() we have code
if (siz == NULL || strlen(siz) == 0 || strcmp(arrsize, 0) == 0 ||
strcmp(arrsize, 1) == 0)
fprintf(o, \n\t%s,%s,(long)%s,(long)%s,%s, , get_type(type),
variable, varcharsize, arrsize, offset);
On Wed, Apr 02, 2014 at 05:49:03PM +0530, Ashutosh Bapat wrote:
I have one more doubt, regarding offsets.
...
This is actually a very good question. Parts of this code are older than my
work on ecpg, meaning they were already in version 0.1. It could very well be
that with some changes over the
Hi MIchael,
I tried to fix the offset problem. PFA the patch. It does solve the problem
of setting wrong offset in ECPGdo() call.
But then there is problem of interpreting the result from server as an
array within array of structure. The problem is there is in
ecpg_get_data(). This function can
Hi Ashutosh,
I tried to fix the offset problem. PFA the patch. It does solve the
problem of setting wrong offset in ECPGdo() call.
Thanks, looks correct to me.
But then there is problem of interpreting the result from server as an
array within array of structure. The problem is there is in
On Tue, Apr 1, 2014 at 11:50 AM, Michael Meskes mes...@postgresql.org wrote:
Hi Ashutosh,
I tried to fix the offset problem. PFA the patch. It does solve the
problem of setting wrong offset in ECPGdo() call.
Thanks, looks correct to me.
But then there is problem of interpreting the result
So, you are saying that we should try to catch such errors and report
during pre-compile time. That's better than silently corrupting the data.
On Tue, Apr 1, 2014 at 10:20 PM, Michael Meskes mes...@postgresql.orgwrote:
Hi Ashutosh,
I tried to fix the offset problem. PFA the patch. It does
On Mon, Mar 24, 2014 at 11:52:30AM +0530, Ashutosh Bapat wrote:
For all the members of struct employee, except arr_col, the size of array
is set to 14 and next member offset is set of sizeof (struct employee). But
for arr_col they are set to 3 and sizeof(int) resp. So, for the next row
Hi,
I tried using integer array within a structure array in ECPG code. But it
resulted in some garbage values being printed from the table. Here are the
details,
The ECPG program is attached (array_test.pgc). It tries to read the
contents of table emp, whose structure and contents are as follows
2014-03-24 07:22 keltezéssel, Ashutosh Bapat írta:
Hi,
I tried using integer array within a structure array in ECPG code. But it resulted in
some garbage values being printed from the table. Here are the details,
The ECPG program is attached (array_test.pgc). It tries to read the contents of
On Mon, Mar 24, 2014 at 3:40 PM, Boszormenyi Zoltan zbos...@pr.hu wrote:
2014-03-24 07:22 keltezéssel, Ashutosh Bapat írta:
Hi,
I tried using integer array within a structure array in ECPG code. But
it resulted in some garbage values being printed from the table. Here are
the details,
12 matches
Mail list logo