Postgres error.....

From: PostreSQL Server <postgres(at)tmt(dot)kaybee(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Postgres error.....
Date: 1998-06-05 18:33:53
Message-ID: Pine.LNX.3.96.980605142933.9172B-100000@tmt.kaybee.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Pulver 1998-06-05 19:02:50 Re: [GENERAL] Free Advertising For Your Business! (fwd)
Previous Message The Hermit Hacker 1998-06-05 18:30:26 [GENERAL] Free Advertising For Your Business! (fwd)