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

From: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Copying data from a CSV file into a table dynamically
Date: 2018-08-14 13:38:27
Message-ID: 1534253907682-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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!!

Thanks in Advance

Regards,
Pavan

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2018-08-14 13:46:43 Re: Copying data from a CSV file into a table dynamically
Previous Message Don Seiler 2018-08-14 13:26:03 Re: Vacuum process waiting on BufferPin