Hi,

> > In general, what is the best way to unpack buffers
> > containing tuples?
 
> Unpack buffers containing tuples?  You don't do
> that.  If you have a page that comes from a table, you grab the tuple offset
> from the line pointer, and start decoding there (probably
> heap_deform_tuple is what you need; note you need a tuple descriptor).  


Thanks for the pointer. I will try that route of recreating tuple 
descriptors and using heap_deform_tuple, although I suspect that 
"heap_deform_tuple" 
cannot be used by a stand-alone application (as it is not externally visible). 
So, I will have to basically rewrite parts of it.
I am hoping to build something that is robust that makes use of as much 
of the existing unpacking code as possible. Any additional
pointers you can give me would be much appreciated. 


> What is the use case for this tool you're writing?

I am trying to build a WAL dumper and hoping to resurrect xlogdump along the 
way. 

Jagan

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to