Unix Technical Forum

reg:File import&export problem

This is a discussion on reg:File import&export problem within the pgsql Admins forums, part of the PostgreSQL category; --> Hi ....... Pls tell me...how to do this? I have to import and export files from/to a database. Say ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 05:32 AM
sandhya
 
Posts: n/a
Default reg:File import&export problem


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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com