Hi all,

Testing a port from Oracle to PG 7.1.3. onto PG 7.2 has error trying to use the
following function (frop OpenACS, to port connect by Oracle statments under PG):

create function tree_level(varchar) returns integer as '
declare
        inkey     alias for $1;
        cnt       integer default 0;
begin
        for i in 1..length(inkey) LOOP
            if substr(inkey,i,1) = ''/'' then
               cnt := cnt + 1;
            end if;
        end LOOP;

        return cnt;

end;' language 'plpgsql';


example:

dbks=# select tree_level(t01_tree_sortkey) from t01_20011231 limit 10;
ERROR:  SearchSysCache: Bad cache id 27

I found the SearchSysCache() function in tools/cache in the PG srcs. Readding
the code, I tought about corruption problems on the database. I made a 
vacuum --analyze dbks, hopping this would "repair" the DB. 

But this still not works. So I'm a bit confused. What's wrong?

Thanks in advance and best regards.

-- 
Jean-Paul ARGUDO 

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to