Thread: How to change/replace an in-memory palloced tuple- tuple data

How to change/replace an in-memory palloced tuple- tuple data

From
Fx
Date:
Hi there ,             i have this scenario :

- postgresql 7.5 ( with modified heap_*  functions to retrieve data
from another dbms)
- the tuple's data is allocated in memory via palloc   (the  tuple table slot and the heap tuple hold a pointer to the
data and not to the buffer pages nor hard disk data pointers)
- the changes (by now) gonna be implemented in  sequential scans. 

Having these , I need to modify the tuple after the ExecQual , and
after the projection so i can save memory , just changing the tuple to
hold a "hash" or compressed data , and decompress / or restore the
tuple data  in the ExecSelect phase.

I tried to do this using  the heap_modifytuple function , and
returning a "newSlot  with a newTuple" instead the "resultSlot" but as
i suppose im missing something  , can anyone help me ? or give me a
clue....

Thanks in advance..
Weimi.. 
-- 
/* Jumping Flowers */


Fwd: How to change/replace an in-memory palloced tuple- tuple data

From
Fx
Date:
---------- Forwarded message ----------
From: Fx <weimaraner@gmail.com>
Date: Mon, 20 Sep 2004 14:32:09 -0300
Subject: How to change/replace an in-memory palloced tuple- tuple data
To: pgsql-hackers@postgresql.org

Hi there ,            i have this scenario :

- postgresql 7.5 ( with modified heap_*  functions to retrieve data
from another dbms)
- the tuple's data is allocated in memory via palloc  (the  tuple table slot and the heap tuple hold a pointer to the
data and not to the buffer pages nor hard disk data pointers)
- the changes (by now) gonna be implemented in  sequential scans.

Having these , I need to modify the tuple after the ExecQual , and
after the projection so i can save memory , just changing the tuple to
hold a "hash" or compressed data , and decompress / or restore the
tuple data  in the ExecSelect phase.

I tried to do this using  the heap_modifytuple function , and
returning a "newSlot  with a newTuple" instead the "resultSlot" but as
i suppose im missing something  , can anyone help me ? or give me a
clue....

Thanks in advance..
Weimi..

--
/* Jumping Flowers */




-- 
/* Jumping Flowers */


Re: Fwd: How to change/replace an in-memory palloced tuple- tuple data

From
Alvaro Herrera
Date:
On Tue, Sep 21, 2004 at 01:00:18PM -0300, Fx wrote:

> I tried to do this using  the heap_modifytuple function , and
> returning a "newSlot  with a newTuple" instead the "resultSlot" but as
> i suppose im missing something  , can anyone help me ? or give me a
> clue....

You need to provide more info.  Why the heap_modifytuple function did
not work?  Also your description of both the situation and the problem
is far from clear.  Reposting your original question verbatim will lead
you nowhere.

Last but not least, a message that's poorly composed does not inspire a
lot of enthusiasm to answer.  Try to be more careful with spacing,
commas, etc.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Sallah, I said NO camels! That's FIVE camels; can't you count?"
(Indiana Jones)