pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Purusothaman A <purusothaman.a@gmail.com>
To: Martijn van Oosterhout <kleptog@svana.org>
To: Purusothaman A <purusothaman.a@gmail.com>
To: Milen A. Radev <milen@radev.net>
To: pgsql-admin@postgresql.org
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Problem with lo_export() and lo_import() from remote machine.
Date: Mon, 11 Sep 2006 15:45:26 +0530
Message-ID: <3650d0d50609110315uff51429n48e038dc6b9a482e@mail.gmail.com> (raw)
In-Reply-To: <20060911100336.GB16564@svana.org>
References: <3650d0d50609090407j237bb710h9bde1675c773925d@mail.gmail.com>
	<edu8r6$k56$1@sea.gmane.org>
	<3650d0d50609090449q2aec1098xc3b62dd169de5843@mail.gmail.com>
	<20060909120613.GA10336@svana.org>
	<3650d0d50609110215j7361bc2dj55e6d7d73af1d07d@mail.gmail.com>
	<20060911093819.GA15769@svana.org>
	<3650d0d50609110257m7b216b27nabb8ae87f7852e2@mail.gmail.com>
	<20060911100336.GB16564@svana.org>

Thanks Martijn van Oosterhout and Marco Bizzarri.

But, according to syntax of client side lo_import and lo_export, we should
have 2 variable PGconn (for esatablished connection) and lobjld (imported
file ID in PostgreSQL).

I don't know how to do this in SQL statements.

pls give me sample client side sql statements.

:)
Purusothaman A

On 9/11/06, Martijn van Oosterhout <kleptog@svana.org> wrote:
>
> On Mon, Sep 11, 2006 at 03:27:09PM +0530, Purusothaman A wrote:
> > Thanks Martijn van Oosterhout,
> >
> > So, I have to write my own wrapper function upon the functions below.
> >   1. Oid lo_import(PGconn *conn, const char *filename);
> >   2. int lo_export(PGconn *conn, Oid lobjId, const char *filename);
>
> Not sure why you need a wrapper (you didn't say which language you were
> using) but those functions work exactly like the version you put in the
> SQL statements, except the filenames are for the client computer with
> client permissions.
>
> Hope this helps,
> --
> Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> > From each according to his ability. To each according to his ability to
> litigate.
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFFBTR4IB7bNG8LQkwRAvhPAJ9KHp9DO1EjPqbkGwBdaSaKx5J90wCfQtZ8
> ijq1n/SgAlwIiEgDI6zfICg=
> =Xk7N
> -----END PGP SIGNATURE-----
>
>
>

view thread (15+ messages)  latest in thread

Message-ID: <3650d0d50609110315uff51429n48e038dc6b9a482e@mail.gmail.com>
Permalink:  ../3650d0d50609110315uff51429n48e038dc6b9a482e@mail.gmail.com/
Also on:    postgresql.org/message-id/3650d0d50609110315uff51429n48e038dc6b9a482e@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: purusothaman.a@gmail.com, kleptog@svana.org, milen@radev.net, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Problem with lo_export() and lo_import() from remote machine.
  In-Reply-To: <3650d0d50609110315uff51429n48e038dc6b9a482e@mail.gmail.com>
  References: <3650d0d50609090407j237bb710h9bde1675c773925d@mail.gmail.com> <edu8r6$k56$1@sea.gmane.org> <3650d0d50609090449q2aec1098xc3b62dd169de5843@mail.gmail.com> <20060909120613.GA10336@svana.org> <3650d0d50609110215j7361bc2dj55e6d7d73af1d07d@mail.gmail.com> <20060911093819.GA15769@svana.org> <3650d0d50609110257m7b216b27nabb8ae87f7852e2@mail.gmail.com> <20060911100336.GB16564@svana.org> <3650d0d50609110315uff51429n48e038dc6b9a482e@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