From: pavan95 <pavan.postgresdba@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: Copying data from a CSV file into a table dynamically
Date: Tue, 14 Aug 2018 06:38:27 -0700 (MST)
Message-ID: <1534253907682-0.post@n3.nabble.com> (raw)
In-Reply-To: <318228ff-6861-8a69-981f-48cb528a0dd9@aklaver.com>
References: <1534252253597-0.post@n3.nabble.com>
<318228ff-6861-8a69-981f-48cb528a0dd9@aklaver.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pavan.postgresdba@gmail.com
Subject: Re: Copying data from a CSV file into a table dynamically
In-Reply-To: <1534253907682-0.post@n3.nabble.com>
References: <1534252253597-0.post@n3.nabble.com> <318228ff-6861-8a69-981f-48cb528a0dd9@aklaver.com> <1534253907682-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox