Re: Use carriage return with copy in PostgreSQL

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Use carriage return with copy in PostgreSQL
Дата
Msg-id CAKFQuwaV=Y7dRyg7XgrYGPr+VTMsiYHUXw50+9Cs6f8E4Htg5g@mail.gmail.com
обсуждение исходный текст
Ответ на Use carriage return with copy in PostgreSQL  (Sergio Alonso <seralonso1014@gmail.com>)
Список pgsql-admin
On Friday, May 14, 2021, Sergio Alonso <seralonso1014@gmail.com> wrote:
('TEST one\r\n' )
TEST one\\r\\n

This has nothing to do with the copy command.  You are mis-informed on how to write string literals, in particular expecting ‘\r’ to be escaped when in fact in a simple string literal the only special character is the single quote.

You need to review 4.1.1.2 (https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS) if you need to write string literals that contain backslash escapes.

David J.

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

Предыдущее
От: Sergio Alonso
Дата:
Сообщение: Use carriage return with copy in PostgreSQL
Следующее
От: Tim
Дата:
Сообщение: pg_upgrade not excluding system tables in EPAS