Thread

  1. ExecOpenScanR: failed to open relation

    Pam Withnall <pamw@zoom.com.au> — 2001-02-20T05:30:14Z

    Hi,
    in my java code I am creating 3 temporary tables, then calling a stored
    procedure which calls another stored procedure.
    then I drop the temporary tables. 
    
    the first time around , eveything is OK  , then when repeating the action I
    get 
    "ExecOpenScanR: failed to open relation 2808495 "
    could it be that an index exists when the table doesn't or
    does it mean the functions did not stop properly ?
    please help.
    Pam Withnall
    
    
    
  2. Re: ExecOpenScanR: failed to open relation

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-02-23T20:30:17Z

    Pam Withnall <Pamw@zoom.com.au> writes:
    > in my java code I am creating 3 temporary tables, then calling a stored
    > procedure which calls another stored procedure.
    > then I drop the temporary tables. 
    > the first time around , eveything is OK  , then when repeating the action I
    > get 
    > "ExecOpenScanR: failed to open relation 2808495 "
    
    If you're using plpgsql, you can't drop and recreate temp tables between
    procedure executions, because the cached query plans for the procedure
    will still refer to the old version of the tables.
    
    Either create the temp table *once* per backend, or use pltcl, which
    doesn't try to cache query plans.
    
    			regards, tom lane
    
    
  3. Re: ExecOpenScanR: failed to open relation

    Jan Wieck <janwieck@yahoo.com> — 2001-02-26T17:16:19Z

    Tom Lane wrote:
    > Pam Withnall <Pamw@zoom.com.au> writes:
    > > in my java code I am creating 3 temporary tables, then calling a stored
    > > procedure which calls another stored procedure.
    > > then I drop the temporary tables.
    > > the first time around , eveything is OK  , then when repeating the action I
    > > get
    > > "ExecOpenScanR: failed to open relation 2808495 "
    >
    > If you're using plpgsql, you can't drop and recreate temp tables between
    > procedure executions, because the cached query plans for the procedure
    > will still refer to the old version of the tables.
    >
    > Either create the temp table *once* per backend, or use pltcl, which
    > doesn't try to cache query plans.
    
        as  long  as  you  don't  tell  it  to (using spi_prepare and
        spi_execp explicitly in PL/Tcl) :-)
    
    
    Jan
    
    --
    
    #======================================================================#
    # It's easier to get forgiveness for being wrong than for being right. #
    # Let's break this rule - forgive me.                                  #
    #================================================== JanWieck@Yahoo.com #
    
    
    
    _________________________________________________________
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com