X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 808FBD1BA75 for ; Sun, 22 Feb 2004 14:13:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 74960-09 for ; Sun, 22 Feb 2004 10:13:29 -0400 (AST) Received: from www.postgresql.com (www.postgresql.com [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id 0CF09D1BA09 for ; Sun, 22 Feb 2004 10:13:26 -0400 (AST) Received: from web14908.mail.yahoo.com (web14908.mail.yahoo.com [216.136.225.60]) by www.postgresql.com (Postfix) with SMTP id BA595CF4824 for ; Sun, 22 Feb 2004 10:13:19 -0400 (AST) Message-ID: <20040222141220.75395.qmail@web14908.mail.yahoo.com> Received: from [203.218.161.160] by web14908.mail.yahoo.com via HTTP; Sun, 22 Feb 2004 22:12:20 CST Date: Sun, 22 Feb 2004 22:12:20 +0800 (CST) From: =?big5?q?Wong=20Eric?= Subject: Re: create large object by tcl To: L J Bayuk Cc: pgsql-interfaces@postgresql.org In-Reply-To: <200402211651.i1LGpFpL000747@mindspring.com> MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/84 X-Sequence-Number: 4777 Thanks for your help and I can create and write to large object by Tcl successfully. (I find that the documentation has mentioned about this and I overlooked it) However, I would like to ask why a transaction is needed for accessing large object? --- L J Bayuk 的郵件內容:> hehe88hk@yahoo.com.hk wrote: > > ... > > If I use the libpgtcl library, I find it can only > get a file > > descriptor of '-1' returned by pg_lo_open. > > > > If I use pgintcl, I find it can only get a file > descriptor of '0' > > returned by pg_lo_open, followed by an error > message: > > > > " > > ERROR: lo_write: invalid large obj descriptor (0) > > ... > > Are you doing all your large object calls inside > transaction blocks, > as required? If not, the large object descriptors > will not be valid. > Send BEGIN, operate on a large object, then send COMMIT. _________________________________________________________ 必殺技、飲歌、小星星... 浪漫鈴聲 情心連繫 http://us.rd.yahoo.com/evt=22281/*http://ringtone.yahoo.com.hk/