X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4F3089DCA3E for ; Wed, 1 Mar 2006 12:11:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18608-05 for ; Wed, 1 Mar 2006 12:11:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 2D5B09DC840 for ; Wed, 1 Mar 2006 12:11:07 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k21GB0Xp078016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Mar 2006 09:11:02 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id k21GAxiQ080217; Wed, 1 Mar 2006 09:10:59 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id k21GAx5q080216; Wed, 1 Mar 2006 09:10:59 -0700 (MST) (envelope-from mfuhr) Date: Wed, 1 Mar 2006 09:10:59 -0700 From: Michael Fuhr To: Tom Lane Cc: sandhya , Postgres Subject: Re: Reg:lo_open error..pls help me Message-ID: <20060301161059.GA80123@winnie.fuhr.org> References: <018201c63d27$34f26ec0$cd00000a@sandhyar> <01b701c63d2a$4d640880$cd00000a@sandhyar> <11079.1141228992@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11079.1141228992@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.122 required=5 tests=[AWL=0.122] X-Spam-Score: 0.122 X-Spam-Level: X-Archive-Number: 200603/10 X-Sequence-Number: 20767 On Wed, Mar 01, 2006 at 11:03:12AM -0500, Tom Lane wrote: > "sandhya" writes: > > But lo_open is returning -1(-ve value). > > Are you sure that's where it's failing? The fragment you showed looks > fine as far as it goes. The most likely bet is you forgot to wrap it in > a transaction (BEGIN/COMMIT commands), but that would result in a > failure at the seek/write commands because the object wouldn't be open > anymore. lo_open() fails if it's not in a transaction. The error from PQerrorMessage is: ERROR: invalid large-object descriptor: 0 -- Michael Fuhr