not(t_xmax = 0) - Mailing list pgsql-general

From Alejandro Carrillo
Subject not(t_xmax = 0)
Date
Msg-id 1358689567.69619.YahooMailNeo@web172205.mail.ir2.yahoo.com
Whole thread Raw
List pgsql-general
Hi,

I need to filter xid != 0. I tried this "not(t_xmax = 0)" but I dont sure that this work ok

How I do it?


Create or replace function obtener_info_reg(tabla varchar, buscareliminado boolean, curs refcursor) returns void as
$$
declare
query_string varchar;
strwhere varchar;
strsql varchar;
blocksize integer := 8192;
begin
query_string:='delete from result_pag';
EXECUTE query_string;
for p in 0..pg_relpages(tabla)-1 loop
query_string:= '';
strsql:='insert into result_pag SELECT '||p||' page,*, 
('||p||'*'|| blocksize ||') + lp_off posini_reg,
('||p||'*'|| blocksize ||') + lp_off + 17 posini_infomask,
(t_infomask-1024) t_infomask_old, to_hex(t_infomask) t_infomask_hex,
to_hex(t_infomask-1024) t_infomask_old  
FROM heap_page_items(get_raw_page(''' || tabla || ''', '||p||'))';
strwhere:='';
if buscareliminado= true then
--add where t_max != 0 to query
strwhere:= ' where not(t_xmax = 0)';
end if;
query_string:= query_string || strsql || strwhere;
EXECUTE query_string;
end loop;
OPEN curs FOR EXECUTE 'select * from result_pag ';
end;
$$ language plpgsql;

pgsql-general by date:

Previous
From: Ashesh Vashi
Date:
Subject: Re: Libpq and multithreading
Next
From: Alexander Reichstadt
Date:
Subject: Re: Cannot install postgres 9.2, less than 32 MB of memory