On Fri, Mar 19, 2004 at 09:39:58AM -0500, Tom Lane wrote:
> Karel Zak <zakkr@zf.jcu.cz> writes:
> >>> It's pity that main idea of current COPY is based on separated lines
> >>> and it is not more common interface for streaming data between FE and BE.
> >>
> >> Yeah, that was another concern I had. This API would let the formatter
> >> control line-level layout but it would not eliminate the hard-wired
> >> significance of newline. What's worse, there isn't any clean way to
> >> deal with reading quoted newlines --- the formatter can't really replace
> >> the default quoting rules if the low-level code is going to decide
> >> whether a newline is quoted or not.
>
> > I think latest protocol version works with blocks of data and no with
> > lines and client PQputCopyData() returns a block -- only docs says that
> > it is row of table.
>
> But you can't assume that the client will send blocks that are
> semantically significant. For instance, if psql is reading a file to
> send with \copy, how's it going to know how the file is formatted?
And what \n in attibutes data in CSV? I think CSV format doesn't usesome escape for newline char. It means psql
with\copy cannot be surewith CSV.
Karel
-- Karel Zak <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/