Forum OpenACS Development: How do correct a cache lookup error

Collapse
Posted by Sid Widge on
Hi Everyone I am working on the wimpy point package. I have managed to create new presentations and create slides within the presentations. I am working on actually viewing those presentations at the moment. But I am getting the following error that I just cannot figure out. If anyone could help me out with this I owuld be most appreciative. The error message is as follows:


[23/Sep/2001:14:43:43][16271.13317][-conn3-] Error: Ns_PgExec: result
status: 7 message: ERROR:  fmgr_info: function 0: cache lookup failed


As far as I can see it is coming from the following query, which seems ok to me. I was hoping someone could tell me what the problem was.

select s.slide_title,
    s.sort_key,
    wp_sliide__get_preamble('2268') as preamble,
    wp_slide__get_postamble('2268') as postamble,
    wp_slide__get_bullet_items('2268') as bullet_items,
    to_char(ao.creation_date, 'HH24:MI, Mon DD, YYYY') as
modified_date
    from cr_wp_slides s, cr_items i, acs_objects ao
    where i.item_id = '2268'
    and   i.live_revision = s.slide_id
    and   ao.object_id = s.slide_id;

Thanks Jack
Collapse
Posted by Sid Widge on
Hi everyone

Further to my question on the cache lookup. I have identified where the problem is. 

The information exists in the database and I have tried running the select statements manually through the databases. They do work when I run them through manually. 

As far as I can see the problem lies in the following section of code which is found in the *-postgres.xql file:



      
    select s.slide_title,
    s.sort_key,
    wp_slide__get_preamble(:slide_item_id) as preamble,
    wp_slide__get_postamble(:slide_item_id) as postamble,
    wp_slide__get_bullet_items(:slide_item_id) as bullet_items,
    to_char(ao.creation_date, 'HH24:MI, Mon DD, YYYY') as modified_date
    from cr_wp_slides s, cr_items i, acs_objects ao
    where i.item_id = :slide_item_id
    and   i.live_revision = s.slide_id
    and   ao.object_id = s.slide_id
      



What I figure is that the problem is coming where it is trying to call wp_slide__get_preamble(integer). This function is as follows:

create function wp_slide__get_preamble(integer)
returns record as'
declare
get_preamble__slide_item_id                alias for $1;
v_blob record;
begin
    select content into v_blob
    from cr_revisions, cr_items
    where cr_items.content_type = ''cr_wp_slide_preamble''
    and cr_items.parent_id = get_preamble.slide_item_id
    and cr_revisions.revision_id = cr_items.live_revision;
    return v_blob;
end;' language 'plpgsql';


Now the error message I am getting is:
Error: Ns_PgExec: result status: 7 message: ERROR:  fmgr_info: function 0: cache lookup failed


But I know that all the individual queries work. It is just the part where the xql file queries: wp_slide__get_preamble. 

I am not sure why this is happening. Would anyone have any suggestion what I could do to rectify this?

Thanks.
Jack P