From: sandhya <sandhyar@amiindia.co.in>
To: Guido Barosio <gbarosio@gmail.com>
Cc: postgre <pgsql-admin@postgresql.org>
Cc: sandhya <sandhyar@amiindia.co.in>
Subject: reg:File import&export problem
Date: Fri, 2 Dec 2005 10:22:17 +0530
Message-ID: <05e401c5f6fc$2bda85a0$cd00000a@amiindiahjwbgh> (raw)
Hi .......
Pls tell me...how to do this?
I have to import and export files from/to a database.
Say i have a file named "sample" (assume some path) and i want to store it in to a database.
I did this through lo_import function and i got the object id when i have used.....the following option.
\lo_list
********* QUERY **********
SELECT loid as "ID", pg_catalog.obj_description(loid, 'pg_largeobject') as "Description"
FROM (SELECT DISTINCT loid FROM pg_catalog.pg_largeobject) x
ORDER BY "ID" Large objects
ID | Description
-------+-------------
58782 |
58783 |
58784 |
But i want to know whether i can see the contents using this id on the database side.How can i view this?
How to store this(object id) if i want to refer using file name(which we exported to db)
Where can i see the file name in DB?Is there any possible way to store the names of the file in a database?
What i thought is:
While importing if there is possibility of storing the file name and Objid in to a table..and whenever if the user wants to export it from the db..by giving filename..we need to refer to that table and send the corresponding OBJID?Am i right
Pls tell me how to do this?
I need this as early as possible.Help me out in doing this....
Thank you,
Sandhya
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: sandhyar@amiindia.co.in, gbarosio@gmail.com
Subject: Re: reg:File import&export problem
In-Reply-To: <05e401c5f6fc$2bda85a0$cd00000a@amiindiahjwbgh>
References: <05e401c5f6fc$2bda85a0$cd00000a@amiindiahjwbgh>
* 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