Thanks a lot for the patience and help. It worked.
Ivan
> To: i@live.com
> CC: klep...@svana.org; dal...@solfertje.student.utwente.nl;
> pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Persistence problem
> Date: Fri, 14 May 2010 18:34:14 -0400
> From: t...@sss
"I. B." writes:
> OK, here is the part of the code.
Well, as suspected, you're doing this
> typedef struct {
> void *units;
> } mapping_t;
and this
> units = (uPoint *) realloc(units, result->noOfUnits *
> sizeof(uPoint)); // EXPLAINED AT THE END OF THE POST
which means that the
th result and result->units... I just don't know
how I should do it. :-/
I hope you understand the problem better now.
Thanks,
Ivan
> To: i@live.com
> CC: klep...@svana.org; dal...@solfertje.student.utwente.nl;
> pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Persi
"I. B." writes:
> How to fix this?
As long as you keep on showing us wrappers, and not the code that
actually does the work, we're going to remain in the dark. What
you have shown us just copies data from point A to point B, and
it looks like it would be fine if the source data conforms to
PG's
this? The one who helps can count on the best Croatian dark beer
shipped directly to his place. ;)
Ivan
From: i@live.com
To: t...@sss.pgh.pa.us
CC: klep...@svana.org; dal...@solfertje.student.utwente.nl;
pgsql-general@postgresql.org
Subject: RE: [GENERAL] Persistence problem
Date: Fri
internallength = VARIABLE,
input = mpoint_in,
output = mpoint_out
);
Please help, it would mean a lot.
Thanks,
Ivan
> To: i@live.com
> CC: klep...@svana.org; dal...@solfertje.student.utwente.nl;
> pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Persistence problem
&
"I. B." writes:
> When I do this:
> realResult = (mPoint *)palloc(result->length);
> memcpy(realResult, result, result->length);
> I get a right result in the same session, but corrupted in the next
> one.
I'm guessing a bit here, but I think what is happening is this:
> typedef struct {
xplanation? Or someone has an idea?
Thank you very much.
Ivan
> Date: Wed, 12 May 2010 19:45:26 +0200
> From: klep...@svana.org
> To: i....@live.com
> CC: dal...@solfertje.student.utwente.nl; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Persistence problem
>
> On Wed
matter if I copied the memory into a new variable?
Ivan
From: i@live.com
To: klep...@svana.org
CC: dal...@solfertje.student.utwente.nl; pgsql-general@postgresql.org
Subject: RE: [GENERAL] Persistence problem
Date: Thu, 13 May 2010 12:04:56 +0200
I'll try to explain with as less
ep...@svana.org
> To: i@live.com
> CC: dal...@solfertje.student.utwente.nl; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Persistence problem
>
> On Thu, May 13, 2010 at 12:04:56PM +0200, I. B. wrote:
> >
> >
> > I'll try to explain with as less c
On Thu, May 13, 2010 at 12:04:56PM +0200, I. B. wrote:
>
>
> I'll try to explain with as less code as possible.
> One of the types I wanted to create is called mpoint. This is a part of code:
> typedef struct {
> int4 length;
> int noOfUnits;
> void *units; // this is later casted
On Wed, May 12, 2010 at 07:12:10PM +0200, I. B. wrote:
>
> That was my first guess. I used palloc everywhere.. But to be sure, after I
> made the type, I tried to do the something like:
>
> mytype * result;
> mytype * realResult;
> result = createType(...);
> realResult = (mytype *)palloc(mytype
didn't help. Is that enough?
> Subject: Re: [GENERAL] Persistence problem
> From: dal...@solfertje.student.utwente.nl
> Date: Wed, 12 May 2010 19:05:36 +0200
> CC: pgsql-general@postgresql.org
> To: i@live.com
>
> On 12 May 2010, at 18:08, I. B. wrote:
>
> &g
On 12 May 2010, at 18:08, I. B. wrote:
> Hello.
>
> I have a problem. I've created several types and functions in C language and
> implemented them successfully. Or at least I thought so... When I insert,
> select, update data, everything works fine, but in that session only. As soon
> as I cl
14 matches
Mail list logo