pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem while using lo_import and lo_export
4+ messages / 3 participants
[nested] [flat]
* Problem while using lo_import and lo_export
@ 2006-08-02 12:54 Penchalaiah P. <penchalaiahp@infics.com>
0 siblings, 1 reply; 4+ messages in thread
From: Penchalaiah P. @ 2006-08-02 12:54 UTC (permalink / raw)
To: pgsql-sql
Hi,
I have PostgresSQL database connection from server. Server ip is
172.16.5.179
Now I want use lo_import and lo_export function for storing images into
the database.
This images is located in my system itself.
When I am going using the following query...
Insert into image
values('chanukya',lo_import('D:/Vivek/Personal/PICS/IN/chanukya.jpg'))
....it rises error 'no such file or directory'
But the same query executing successfully in my local database...
Could please tell me to resolve this problem...
Thanks & Regards
Penchal reddy | Software Engineer
Infinite Computer Solutions | Exciting Times...Infinite Possibilities...
SEI-CMMI level 5 | ISO 9001:2000
IT SERVICES | BPO
Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities |
Retail & Distribution | Government
Tel +91-80-5193-0000(Ext:503)| Fax +91-80-51930009 | Cell No
+91-9980012376|www.infics.com
Information transmitted by this e-mail is proprietary to Infinite
Computer Solutions and/ or its Customers and is intended for use only by
the individual or entity to which it is addressed, and may contain
information that is privileged, confidential or exempt from disclosure
under applicable law. If you are not the intended recipient or it
appears that this mail has been forwarded to you without proper
authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at info.in@infics.com and delete this mail from
your records.
Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem while using lo_import and lo_export
@ 2006-08-03 00:09 Aaron Bono <postgresql@aranya.com>
parent: Penchalaiah P. <penchalaiahp@infics.com>
0 siblings, 1 reply; 4+ messages in thread
From: Aaron Bono @ 2006-08-03 00:09 UTC (permalink / raw)
To: Penchalaiah P. <penchalaiahp@infics.com>; +Cc: pgsql-sql
On 8/2/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:
>
> Hi,
>
>
>
> I have PostgresSQL database connection from server. Server ip is
> 172.16.5.179
>
>
>
> Now I want use lo_import and lo_export function for storing images into
> the database.
>
>
>
> This images is located in my system itself.
>
>
>
> When I am going using the following query…
>
>
>
> Insert into image
> values('chanukya',lo_import('D:/Vivek/Personal/PICS/IN/chanukya.jpg'))
>
>
>
> ….it rises error 'no such file or directory'
>
Looks like you are running on a Windows machine. Did you try:
Insert into image
values('chanukya',lo_import('D:\Vivek\Personal\PICS\IN\chanukya.jpg'));
Windows uses \, not /. I am not sure if PostgreSQL will translate for you
like Java does.
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem while using lo_import and lo_export
@ 2006-08-03 01:33 Rodrigo De León <rdeleonp@gmail.com>
parent: Aaron Bono <postgresql@aranya.com>
0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo De León @ 2006-08-03 01:33 UTC (permalink / raw)
To: pgsql-sql
On 8/2/06, Aaron Bono <postgresql@aranya.com> wrote:
> On 8/2/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:
> > Hi,
> >
> >
> >
> > I have PostgresSQL database connection from server. Server ip is
> 172.16.5.179
> >
> >
> >
> > Now I want use lo_import and lo_export function for storing images into
> the database.
> >
> >
> >
> > This images is located in my system itself.
> >
> >
> >
> > When I am going using the following query…
> >
> >
> >
> > Insert into image
> values('chanukya',lo_import('D:/Vivek/Personal/PICS/IN/chanukya.jpg'))
> >
> >
> >
> >
> > ….it rises error 'no such file or directory'
>
> Looks like you are running on a Windows machine. Did you try:
>
> Insert into image
> values('chanukya',lo_import('D:\Vivek\Personal\PICS\IN\chanukya.jpg'));
>
> Windows uses \, not /. I am not sure if PostgreSQL will translate for you
> like Java does.
I believe PostgreSQL accepts slashes as a separator on Win32 (I used
it that way with COPY), but if you want to use backslashes, you have
to escape them:
INSERT INTO IMAGE
VALUES ('chanukya', lo_import('D:\\Vivek\\Personal\\PICS\\IN\\chanukya.jpg'));
Also, I'm not sure if Penchalaiah means that "Server" = "my system
itself", double check on that.
Regards,
Rodrigo
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem while using lo_import and lo_export
@ 2006-08-03 04:05 Aaron Bono <postgresql@aranya.com>
parent: Rodrigo De León <rdeleonp@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Aaron Bono @ 2006-08-03 04:05 UTC (permalink / raw)
To: Rodrigo De León <rdeleonp@gmail.com>; +Cc: pgsql-sql
On 8/2/06, Rodrigo De León <rdeleonp@gmail.com> wrote:
>
> On 8/2/06, Aaron Bono <postgresql@aranya.com> wrote:
> > On 8/2/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:
> > > Hi,
> > >
> > > I have PostgresSQL database connection from server. Server ip is
> > 172.16.5.179
> > >
> > > Now I want use lo_import and lo_export function for storing images
> into
> > the database.
> > >
> > > This images is located in my system itself.
> > >
> > > When I am going using the following query…
> > >
> > > Insert into image
> > values('chanukya',lo_import('D:/Vivek/Personal/PICS/IN/chanukya.jpg'))
> > >
> > > ….it rises error 'no such file or directory'
> >
> > Looks like you are running on a Windows machine. Did you try:
> >
> > Insert into image
> > values('chanukya',lo_import('D:\Vivek\Personal\PICS\IN\chanukya.jpg'));
> >
> > Windows uses \, not /. I am not sure if PostgreSQL will translate for
> you
> > like Java does.
>
> I believe PostgreSQL accepts slashes as a separator on Win32 (I used
> it that way with COPY), but if you want to use backslashes, you have
> to escape them:
>
> INSERT INTO IMAGE
> VALUES ('chanukya',
> lo_import('D:\\Vivek\\Personal\\PICS\\IN\\chanukya.jpg'));
>
> Also, I'm not sure if Penchalaiah means that "Server" = "my system
> itself", double check on that.
Good point. I presume that PostgreSQL will look at the path relative to the
server, not the client. I personally keep my files in CVS and just put
references to the files in PostgreSQL. Of course, I had to write the code
that automatically checks the files into CVS but it works quite well.
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-08-03 04:05 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-02 12:54 Problem while using lo_import and lo_export Penchalaiah P. <penchalaiahp@infics.com>
2006-08-03 00:09 ` Aaron Bono <postgresql@aranya.com>
2006-08-03 01:33 ` Rodrigo De León <rdeleonp@gmail.com>
2006-08-03 04:05 ` Aaron Bono <postgresql@aranya.com>
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