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 695C69DC97A for ; Wed, 1 Mar 2006 12:03:20 -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 17469-07 for ; Wed, 1 Mar 2006 12:03:18 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 203549DC821 for ; Wed, 1 Mar 2006 12:03:17 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k21G3CsS011080; Wed, 1 Mar 2006 11:03:12 -0500 (EST) To: "sandhya" cc: "Postgres" Subject: Re: Reg:lo_open error..pls help me In-reply-to: <01b701c63d2a$4d640880$cd00000a@sandhyar> References: <018201c63d27$34f26ec0$cd00000a@sandhyar> <01b701c63d2a$4d640880$cd00000a@sandhyar> Comments: In-reply-to "sandhya" message dated "Wed, 01 Mar 2006 17:48:51 +0530" Date: Wed, 01 Mar 2006 11:03:12 -0500 Message-ID: <11079.1141228992@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200603/9 X-Sequence-Number: 20766 "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. You might want to look at src/test/examples/testlo.c in the PG distribution. regards, tom lane