Re: COPY .... WITH (FORMAT binary) causes syntax error at or near "binary"

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: COPY .... WITH (FORMAT binary) causes syntax error at or near "binary"
Дата
Msg-id 1309878337-sup-685@alvh.no-ip.org
обсуждение исходный текст
Ответ на COPY .... WITH (FORMAT binary) causes syntax error at or near "binary"  (Pavel Golub <pavel@microolap.com>)
Ответы Re: COPY .... WITH (FORMAT binary) causes syntax error at or near "binary"  (Pavel Golub <pavel@microolap.com>)
Re: [BUGS] COPY .... WITH (FORMAT binary) causes syntax error at or near "binary"  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Excerpts from Pavel Golub's message of mar jul 05 10:52:06 -0400 2011:
> Hello.
> 
> System: PostgreSQL v9.0 Windows XP SP3
> SQL: COPY "tablename" TO STDOUT WITH (FORMAT binary)
> ERROR:  syntax error at or near "binary"
> LINE 1: ...OPY "tablename" TO STDOUT WITH (FORMAT binary)
>                                                   ^
> 
> ********** Error **********
> 
> ERROR: syntax error at or near "binary"
> SQL state: 42601
> Character: 55
> 
> But if I use 'FORMAT text' or 'FORMAT csv' all is OK.
> 
> Suppose this happens because BINARY is not listed in
> "unreserved_keyword" neither in "col_name_keyword parser" parser rules, but
> listed in "type_func_name_keyword" instead.

That seems pretty unfortunate.  Of course, it works if you quote it:

COPY "tablename" TO STDOUT WITH (FORMAT "binary")

I assume it's not in unreserved_keyword because it would cause a
shift/reduce conflict elsewhere.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Move Trigger and TriggerDesc structs out of rel.h into a new rel
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Small SSI issues