Re: Howto import regularly some CSV files with variing names?

Поиск
Список
Период
Сортировка
От Andreas
Тема Re: Howto import regularly some CSV files with variing names?
Дата
Msg-id 5240E111.7090308@gmx.net
обсуждение исходный текст
Ответ на Re: Howto import regularly some CSV files with variing names?  (Adrian Klaver <adrian.klaver@gmail.com>)
Ответы Re: Howto import regularly some CSV files with variing names?  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Howto import regularly some CSV files with variing names?  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
Am 24.09.2013 02:25, schrieb Adrian Klaver:
> On 09/23/2013 05:19 PM, Andreas wrote:
>>
>> I need to import some log-files of an application [...]
>> The import would be easy if the files had a constant name but the app
>> creates csv files with names like "ExportYYYYMMDD".
>>
>>
>> So   how would I get the filenames into the sql-script?
>
> Do man on find and look for -exec.
>

I could find the files and exec a shell script but how can I have a SQL
script take the found filenames as parameter?

The SQL script needs to create a temp table
then COPY the file with the filename it got as parameter into the temp table
then insert from there into the log-table

How would I get the filenames into the SQL script?


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

Предыдущее
От: Muhammad Bashir Al-Noimi
Дата:
Сообщение: Re: Building with MinGW issue
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: How to create recurrence schedule event?