Re: How to insert data from a text file

Поиск
Список
Период
Сортировка
От damien clochard
Тема Re: How to insert data from a text file
Дата
Msg-id 4A644076.70705@dalibo.info
обсуждение исходный текст
Ответ на How to insert data from a text file  (Mike <1100100@gmail.com>)
Ответы Re: How to insert data from a text file  (Michael Wood <esiotrot@gmail.com>)
Список pgsql-novice
Mike a écrit :
> Background:
>
> Thousands of folders and files filled with client data on the linux
> samba server.
> Searching for data is difficult due to ever-changing directory
> structures and naming schemes.
>
> Example (exaggerating to make a point):
>
> /air/water/vegetable/animal/broccoli/potato/crabby_client.doc
> /animal/broccoli/air/vegetable/poise_and_honor.pdf
>
> It goes on for about 650,000 files
>
> I used the following command to gather all file and directory names.
> "/abc" is the main directory on the linux samba server where all
> company data is located:
>
> root@acme:/# ls -Ralh /abc > /home/mike/file_output.txt
>
> file_output.txt is 33 megs. and lists approximately 650,000 file names
> and their directory paths.
>
> I want to pull all the file name info. and directory path info. from
> "file_output.txt" and place each file name into a postgresql database
> along with the related file location information.
> The ultimate goal is to be able to make an alpha-numeric query and be
> presented with matching file names and their location on the samba
> server.
>
> How do I pull the data from "file_output.txt" and place it into the
> postgres database?
>

pgloader might help you :

http://pgfoundry.org/projects/pgloader/




В списке pgsql-novice по дате отправления:

Предыдущее
От: "Mohlomi Moloi"
Дата:
Сообщение: Re: Maximize columns in a table
Следующее
От: Abhi_m
Дата:
Сообщение: how to ignore a column from pg_dump