Re: Fixing backslash dot for COPY FROM...CSV

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fixing backslash dot for COPY FROM...CSV
Дата
Msg-id 1297666.1712332957@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fixing backslash dot for COPY FROM...CSV  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: Fixing backslash dot for COPY FROM...CSV
Re: Fixing backslash dot for COPY FROM...CSV
Список pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
>     Tom Lane wrote:
>> I've looked over this patch and I generally agree that this is a
>> reasonable solution.

> Thanks for reviewing this!

While testing this, I tried running the tests with an updated server
and non-updated psql, and not only did the new test case fail, but
so did a bunch of existing ones.  That's because existing psql will
send the trailing "\." of inlined data to the server, and the updated
server will now think that's data if it's in CSV mode.

So this means that the patch introduces a rather serious cross-version
compatibility problem.  I doubt we can consider inlined CSV data to be
a niche case that few people use; but it will fail every time if your
psql is older than your server.

Not sure what to do here.  One idea is to install just the psql-side
fix, which should break nothing now that version-2 protocol is dead,
and then wait a few years before introducing the server-side change.
That seems kind of sad though.

An argument for not waiting is that psql may not be the only client
that needs this behavioral adjustment, and if so there's going to
be breakage anyway when we change the server; so we might as well
get it over with.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: documentation structure
Следующее
От: "Imseih (AWS), Sami"
Дата:
Сообщение: Re: Psql meta-command conninfo+