Re: Copying data from a CSV file into a table dynamically

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Copying data from a CSV file into a table dynamically
Дата
Msg-id f2d796ab-ad65-8fe9-a217-8ba054a6cc25@aklaver.com
обсуждение исходный текст
Ответ на Re: Copying data from a CSV file into a table dynamically  (pavan95 <pavan.postgresdba@gmail.com>)
Список pgsql-general
On 08/14/2018 06:38 AM, pavan95 wrote:
> Hi Adrian,
> 
> I tried to use
> *"COPY postgres_log1 FROM '/tmp/abc/xyz/postgresql-`date --date="0 days ago"
> +%Y-%m-%d`_*.csv' WITH csv;"*
> 
> But it resulted in an error. How to issue such that it is understandable by
> psql?
> 
> And I am completely unaware of python & psycopg2. Anything which suits my
> requirement is enough!!

Well I was just using that as an example. If you are not familiar with 
Python then you would probably be better off using a language and it's 
associated Postgres adapter you are comfortable with.

> 
> Thanks in Advance
> 
> Regards,
> Pavan
> 
> 
> 
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Ruiqiang Chen
Дата:
Сообщение: Re: Copying data from a CSV file into a table dynamically
Следующее
От: Don Seiler
Дата:
Сообщение: Re: Vacuum process waiting on BufferPin