Re: Problem with lo_export() and lo_import() from remote machine.

From: "Milen A(dot) Radev" <milen(at)radev(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with lo_export() and lo_import() from remote machine.
Date: 2006-09-09 11:34:03
Message-ID: edu8r6$k56$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Purusothaman A написа:
> Hi all,
>
> I have problem while using "lo_export()" and "lo_import()" from remote
> system.
>
> eg:
> ****
> select lo_export(img_file, 'E:\\temp\\1001.jpg') from master where emp_id =
> '1001';
> insert into master(img_file) values(lo_import('E:\\temp\\1001.jpg')) where
> emp_id = '1001';
>
> Here column "img_file" is OID data type.
>
> The above query works, if I enter from PostgreSQL server machine.
> But the same query fails, if I enter from any other client machine in my
> LAN.
>
> All other queries work well from remote machine, which do not deal OID data
> type column.
>
> any suggestions would be appreciated.
>

Please, RTFM - http://www.postgresql.org/docs/current/static/lo-funcs.html

Quote:

"The server-side lo_import and lo_export functions behave considerably
differently from their client-side analogs. These two functions read and
write files in the server's file system, using the permissions of the
database's owning user. Therefore, their use is restricted to
superusers. In contrast, the client-side import and export functions
read and write files in the client's file system, using the permissions
of the client program. The client-side functions can be used by any
PostgreSQL user."

--
Milen A. Radev

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Purusothaman A 2006-09-09 11:49:26 Re: Problem with lo_export() and lo_import() from remote machine.
Previous Message Purusothaman A 2006-09-09 11:07:24 Problem with lo_export() and lo_import() from remote machine.

Browse pgsql-general by date

  From Date Subject
Next Message Purusothaman A 2006-09-09 11:49:26 Re: Problem with lo_export() and lo_import() from remote machine.
Previous Message Purusothaman A 2006-09-09 11:07:24 Problem with lo_export() and lo_import() from remote machine.