From: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: need to pass the csv file name as value to the column file_id |
Date: | 2014-06-11 14:35:48 |
Message-ID: | 1402497348563-5806834.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
David G Johnston wrote
>
> kranthi wrote
>> Hi All,
>> I need to copy data from csv file, In that table I have one column as
>> file_id. I need to pass the csv file name as value to the column file_id.
>> Could please help on this.
> Then the name of the CSV file has to be part of the content in the file.
One other possibility is to create a temporary table with the appropriate
default for the filename column.
There really isn't any way for you to use programs, like sed/awk/perl, to
add the data to the original file unless you use psql to perform the
transfer (if that is even an option in this context).
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/need-to-pass-the-csv-file-name-as-value-to-the-column-file-id-tp5806798p5806834.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-06-11 16:03:23 | Re: need to pass the csv file name as value to the column file_id |
Previous Message | David G Johnston | 2014-06-11 13:42:27 | Re: need to pass the csv file name as value to the column file_id |