Search Postgresql Archives

importing downloaded data

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

 



Postgresql 9.3
I am downloading data that I want to import into a table. The data comes in tab delimited, CRLF format.
I am using plpython to get the data and I wanted to use copy with stdin to import it without having to save it to a file.
To do this, I am setting sys.stdin to a StringIO object with my data inside.

However, when I call copy I am getting SPI_ERROR_COPY, which the docs define as "if COPY TO stdout or COPY FROM stdin was attempted"  which is exactly what I am trying to do (so the error is logical).

Is there another method of loading delimited data in bulk without saving it as a file?

Thanks
Sim

[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