X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7B9CC9FA606 for ; Thu, 22 Jun 2006 07:03:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 49554-07 for ; Thu, 22 Jun 2006 07:03:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.227]) by postgresql.org (Postfix) with ESMTP id 1AFF49F9ED6 for ; Thu, 22 Jun 2006 07:03:24 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id i3so359359wra for ; Thu, 22 Jun 2006 03:03:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CTpgKzprjKwnBCfMomDvBccUGYC04B2v9XeOzmOS+5MErxuVvOw+iC7xXLy5mj59AuPemx5D+iuqyDLKgVZjW+i5hBuBxXDPIY/QHiJz+N1sR2MuDYs7vT5WGyKXKzQJlNvZuvqwO9X0YF68Qus8V8RWa0fgPlOM7qG8V3HCTkM= Received: by 10.54.125.11 with SMTP id x11mr3098747wrc; Thu, 22 Jun 2006 03:03:23 -0700 (PDT) Received: by 10.54.135.18 with HTTP; Thu, 22 Jun 2006 03:03:23 -0700 (PDT) Message-ID: <3f0d61c40606220303k5df56eb7pae4bfa69b4ef72be@mail.gmail.com> Date: Thu, 22 Jun 2006 12:03:23 +0200 From: "Marco Bizzarri" To: sandhya Subject: Re: reg:lo_write Cc: Postgres In-Reply-To: <3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <00d601c695cf$d0edc490$cd00000a@sandhyar> <3f0d61c40606220113i425bde7brd60ec33a87f592f9@mail.gmail.com> <014c01c695e2$62c0d530$cd00000a@sandhyar> <3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/191 X-Sequence-Number: 22153 Did you look at this example? http://www.redhat.com/docs/manuals/database/RHDB-7.1.3-Manual/prog/largeobjects.html (I think you can find better example in the postgresql documentation, this was the first one I found) On 6/22/06, Marco Bizzarri wrote: > Hi Sandhya. > > On 6/22/06, sandhya wrote: > > Hi Macro.. > > If i assign my lobj_fd(say LO file descriptor) to one Global int. > > But will my lo_write work if i pass that global int inplace of lobjfd.... > > Yes, I think so. > > > One more thing...It should be in "begin" and "end" sessions right! > > If you mean inside a single transaction, yes, the lobj_fd is sensible > within one transaction. > > > How can i open a LO in many places and write the content into it.....Will it > > get appended to the previous content? > > If you have to open and append to the previous content, you could use > other lo_lseek, and pass it SEEK_END, so that you will position to the > end of the LO. At that point, you could "append" to the end of the LO. > > > You said two different file descriptors i will be having?How to overcome > > it?Any suggestion pls > > > > Anybody please give me suggestion how can i over come this problem?So that i > > can proceed further > > > > > > > > > > ----- Original Message ----- > > From: "Marco Bizzarri" > > To: "sandhya" > > Cc: "Postgres" > > Sent: Thursday, June 22, 2006 1:43 PM > > Subject: Re: [ADMIN] reg:lo_write > > > > > > > I'm not sure, but I think you will have problems. As far as I can > > > understand, largeobject semantics is similar to files. Therefore, you > > > open an existing LO, and you obtain a file descriptor, which will > > > point (I think) at the start of the LO. If you write something, the > > > file descriptor will be moved accordingly. If you open again (i.e. you > > > issue another lo_open), you will have another file descriptor for the > > > same LO, which will be at the start of the LO, and you will overwrite > > > your previous LO. > > > > > > Please take care with these advices as I'm not a PostgreSQL expert, > > > just reporting some experience. > > > > > > Regards > > > Marco > > > > > > On 6/22/06, sandhya wrote: > > > > > > > > > > > > Hi, > > > > > > > > If i use lo_write in different function to write data into an > > object,Will > > > > there be any problem? > > > > like, > > > > I open my object and add data into it and in another function if i again > > > > open the same object and add data....It will append to the previous > > content > > > > right!Am i wrong? > > > > > > > > If i wants to append the content to the present object is there anything > > i > > > > need to do? > > > > Please help me in doing this................ > > > > I am unable to see the image which i am exporting... > > > > Thank you, > > > > Sandhya > > > > > > > > > > > > > -- > > > Marco Bizzarri > > > http://notenotturne.blogspot.com/ > > > > > > ---------------------------(end of broadcast)--------------------------- > > > TIP 9: In versions below 8.0, the planner will ignore your desire to > > > choose an index scan if your joining column's datatypes do not > > > match > > > > > > > > > > > Regards > Marco > > -- > Marco Bizzarri > http://notenotturne.blogspot.com/ > -- Marco Bizzarri http://notenotturne.blogspot.com/