Search Postgresql Archives

Loading text files into a text attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello folks,

I have the following problem:

I have a bunch of text files, I want to load them into a table where each
file will be stored in one row.

Question 1: Is there any way how to do this in psql?

AFAIK the \copy command interprets \n as a new line and so I can't get it
done what I want. So I wrote a C program that parses my text files and
anywhere it sees a \n it puts \\n and then concatenates the files, etc. -
quite complicated.

Question 2: Is there a simpler way of doing this?

Thanks in advance

Zoltan


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux