user-friendliness improvement of pageinspect
Hi,
Why does the heap_page_item () of the pageinspect extension not consider providing better user-friendliness?
My test table has the following data, and when I look at the t_data I see data of type bytea instead of a more intuitive type, even the same type as the original table.
# select * from test1;
a | b
---+------
1 | text
(1 row)
# SELECT lp as tuple, t_xmin, t_xmax, t_attrs[1] as a, t_attrs[2] as b FROM heap_page_item_attrs(get_raw_page('test1', 0), 'test1');
tuple | t_xmin | t_xmax | a | b
-------+--------+--------+------------+--------------
1 | 587 | 0 | \x01000000 | \x0b74657874
(1 row)
Similar to this effect:
# SELECT lp as tuple, t_xmin, t_xmax, t_attrs[1] as a, t_attrs[2] as b FROM heap_page_item_attrs(get_raw_page('test1', 0), 'test1');
tuple | t_xmin | t_xmax | a | b
-------+--------+--------+------------+--------------
1 | 587 | 0 | 1 | text
(1 row)
Look forward to the solution.
On Tue, Jul 10, 2018 at 12:41 AM, 杨杰 <yonj1e@163.com> wrote:
Why does the heap_page_item () of the pageinspect extension not consider
providing better user-friendliness?My test table has the following data, and when I look at the t_data I see
data of type bytea instead of a more intuitive type, even the same type as
the original table.
tuple_data_split() can do this (split the data into individual
attributes). If you want a friendlier, more visual way of getting this
information, then you may find pg_hexedit helpful:
https://github.com/petergeoghegan/pg_hexedit
--
Peter Geoghegan
Thank you for your answer.
my question is not split the data into individual attributes.
I want to see the data in the table, but I don't want to be a bytea type.
在2018年7月11日 02:48,Peter Geoghegan<pg@bowt.ie> 写道:
On Tue, Jul 10, 2018 at 12:41 AM, 杨杰 <yonj1e@163.com> wrote:
Why does the heap_page_item () of the pageinspect extension not consider
providing better user-friendliness?
My test table has the following data, and when I look at the t_data I see
data of type bytea instead of a more intuitive type, even the same type as
the original table.
tuple_data_split() can do this (split the data into individual
attributes). If you want a friendlier, more visual way of getting this
information, then you may find pg_hexedit helpful:
https://github.com/petergeoghegan/pg_hexedit
--
Peter Geoghegan
On Tue, Jul 10, 2018 at 6:44 PM, Yang Jie <yonj1e@163.com> wrote:
my question is not split the data into individual attributes.
I want to see the data in the table, but I don't want to be a bytea type.
What's wrong with simply using an SQL query?
--
Peter Geoghegan
Simple queries are fine, but pageinspect can query previous data. If you return the same result as a simple query, this is similar to the oracle flashback version query.
On 7/11/2018 09:51,Peter Geoghegan<pg@bowt.ie> wrote:
On Tue, Jul 10, 2018 at 6:44 PM, Yang Jie <yonj1e@163.com> wrote:
my question is not split the data into individual attributes.
I want to see the data in the table, but I don't want to be a bytea type.
What's wrong with simply using an SQL query?
--
Peter Geoghegan
On Tue, Jul 10, 2018 at 6:55 PM, Yang Jie <yonj1e@163.com> wrote:
Simple queries are fine, but pageinspect can query previous data. If you
return the same result as a simple query, this is similar to the oracle
flashback version query.
Please don't top-post.
That may be true in some limited sense, but querying old data like
that seems totally impractical. You might do something like that for
forensic purposes, as a once off thing, but you didn't say anything
about your high level goals here.
--
Peter Geoghegan