Re: New "single" COPY format
От | David G. Johnston |
---|---|
Тема | Re: New "single" COPY format |
Дата | |
Msg-id | CAKFQuwYrwwgMzgAf45iubLbrFt-jTbMYLSrjzYo25+=5Fdaqfg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: New "single" COPY format ("Joel Jacobson" <joel@compiler.org>) |
Список | pgsql-hackers |
On Saturday, November 9, 2024, Joel Jacobson <joel@compiler.org> wrote:
On Sat, Nov 9, 2024, at 08:07, Joel Jacobson wrote:
> Here's a draft of an idea I'm considering (not yet implemented):
I realize the last part about optional quoting is unnecessary,
since if quoting is desired, users could just use the 'csv' format.
Revised draft of the idea (not yet implemented):
- Fast path for newline-free types:
For the list of built-in types where we know the ::text representation cannot
contain newlines, we take the fast path in NextCopyFromRawFields(),
pointing cstate->raw_fields[0] directly to cstate->line_buf.data.
- Handling newlines for other types:
For any other types, we would need to scan the string for newline characters.
If a newline is encountered, it results in an error.
Make sense to me.
David J.
В списке pgsql-hackers по дате отправления: