pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marco Bizzarri <marco.bizzarri@gmail.com>
To: sandhya <sandhyar@amiindia.co.in>
Cc: Postgres <pgsql-admin@postgresql.org>
Subject: Re: reg:lo_write
Date: Thu, 22 Jun 2006 12:01:44 +0200
Message-ID: <3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com> (raw)
In-Reply-To: <014c01c695e2$62c0d530$cd00000a@sandhyar>
References: <00d601c695cf$d0edc490$cd00000a@sandhyar>
	<3f0d61c40606220113i425bde7brd60ec33a87f592f9@mail.gmail.com>
	<014c01c695e2$62c0d530$cd00000a@sandhyar>

Hi Sandhya.

On 6/22/06, sandhya <sandhyar@amiindia.co.in> 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" <marco.bizzarri@gmail.com>
> To: "sandhya" <sandhyar@amiindia.co.in>
> Cc: "Postgres" <pgsql-admin@postgresql.org>
> 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 <sandhyar@amiindia.co.in> 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/



view thread (7+ messages)  latest in thread

Message-ID: <3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com>
Permalink:  ../3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com/
Also on:    postgresql.org/message-id/3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: marco.bizzarri@gmail.com, sandhyar@amiindia.co.in
  Subject: Re: reg:lo_write
  In-Reply-To: <3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com>
  References: <00d601c695cf$d0edc490$cd00000a@sandhyar> <3f0d61c40606220113i425bde7brd60ec33a87f592f9@mail.gmail.com> <014c01c695e2$62c0d530$cd00000a@sandhyar> <3f0d61c40606220301m27da36cfvacaeff9e272f2fad@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox