Postgres error..... - Mailing list pgsql-general

From PostreSQL Server
Subject Postgres error.....
Date
Msg-id Pine.LNX.3.96.980605142933.9172B-100000@tmt.kaybee.org
Whole thread Raw
Responses A couple of LIBPQ questions  (Bruce Tong <zztong@laxmi.ev.net>)
List pgsql-general
i wrote this simple script that exports a large object from database to a
file using the same database that contains a table  which matches the
objOid's to their names.  The script will work sometimes but sometimes it
doesn't.   Any one have any ideas...??? here is the script and the error.


proc export_file_lo { large_object_name filename {db "lo_db"} {host
"localhost"}
 {port "5432"} } {

     global lo_continue
     set conn [pg_connect $db -host $host -port $port]

     set lo_continue "false"

     pg_select $conn "SELECT * from match where name=
    \'$large_object_name\'" result {set objOid [process_result result]}

     if {$lo_continue == "true"} {

          pg_lo_export $conn $objOid $filename
     } else {
          puts "No object associated with name \"$large_object_name\" found."
          pg_disconnect $conn
          return 0
     }

     pg_disconnect $conn
     return 1


}

proc process_result {arrName} {
global lo_continue
upvar $arrName result

     set lo_continue "true"
     set objOid $result(objoid)

     return $objOid
}



Output:

    NOTICE:  SIAssignBackendId: discarding tag 2147483553
    Connection to database failed
    FATAL 1:  Backend cache invalidation initialization failed




thanks,tim


pgsql-general by date:

Previous
From: The Hermit Hacker
Date:
Subject: [GENERAL] Free Advertising For Your Business! (fwd)
Next
From: Mark Pulver
Date:
Subject: Re: [GENERAL] Free Advertising For Your Business! (fwd)