Re: (Updated) Table File Format
От | Hannu Krosing |
---|---|
Тема | Re: (Updated) Table File Format |
Дата | |
Msg-id | 3A3A560E.38D025DF@tm.ee обсуждение исходный текст |
Ответ на | (Updated) Table File Format ("Michael Richards" <miker@interchange.ca>) |
Список | pgsql-hackers |
Michael Richards wrote: > > Okay, > > Where would I find a definition of the tuple data? I didn't see anything > promising in include/storage? > > I've found a definition for the page inside pagebuf.h That clears up all the > page stuff. I'm still having a little trouble decoding the tuple data > within. Hannu Krosing sent me a python script to do the extract, but having > never seen a line of Python before in my life, I'm having a little trouble > with the actual tuple data. I can see where the actual transaction > visibility info is in the tuple data, but the actual data... nope. My > program (c++) is at the point where it will create tuple objects for every > block of "tuple" data within the page. IIRC, the data field format for individual fields is the same as defined in the back-end/front-end protocol for binary cursors. if there are any NULL fields in the record then there is a flag somewhere in the tuple header and a bitmap of N*32 bits (N=no_of_fields/32) for missing . It is possible that there is no flag and you must deduce the presence of bitmap from the tuple-header length, im not sure which way it was. The actual fields in a table and their order must be extracted from pg_class and pg_attribute tables. ------------ Hannu
В списке pgsql-hackers по дате отправления: