Re: Copy function syntax on 8.1

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Copy function syntax on 8.1
Дата
Msg-id 200508301635.j7UGZF717292@candle.pha.pa.us
обсуждение исходный текст
Ответ на Copy function syntax on 8.1  ("Mike G." <mike@thegodshalls.com>)
Список pgsql-novice
Mike G. wrote:
> Hi,
>
> In testing 8.1 I turned on the escape_string_warning.  Now when I issue
> a COPY FROM / TO 'C:\\test' I am getting the "non standard.." warning
> since file paths in Windows use the \ character.  I can clear the
> warning by changing the syntax to E'C:\\test'.
>
> Is their a way to properly escape the \ without using E or will the
> COPY function have to modified internally to not return a warning if
> a \ is passed in the file path?
>

The code is functioning exactly as described in the release notes,
mainly you have to use E'' for backslashes in strings.  COPY will not be
modified to suppress those.  It is working properly.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: "Mike G."
Дата:
Сообщение: Copy function syntax on 8.1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Copy function syntax on 8.1