Re: [BUGS] COPY .... (FORMAT binary) syntax doesn't work
| От | Simon Riggs |
|---|---|
| Тема | Re: [BUGS] COPY .... (FORMAT binary) syntax doesn't work |
| Дата | |
| Msg-id | CA+U5nMLXsBwFWAeK5rNgspckrb=RKSuu38=0pmNqoS4QBowQ1Q@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: [BUGS] COPY .... (FORMAT binary) syntax doesn't work (Heikki Linnakangas <hlinnakangas@vmware.com>) |
| Список | pgsql-hackers |
On 26 May 2013 16:35, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
>> My attempts to fix that look pretty ugly, so I'm not even going to
>> post them. I can stop the error on binary by causing errors on csv and
>> text, obviously not a fix. Any grammar based fix looks like it would
>> restrict the list of formats, which breaks the orginal intention of
>> the syntax change.
>
>
> This seems to work:
This was almost exactly the fix I described above that only fixes that
specific case and then breaks others.
> --- a/src/backend/parser/gram.y
> +++ b/src/backend/parser/gram.y
> @@ -2528,3 +2528,7 @@ copy_generic_opt_elem:
> {
> $$ = makeDefElem($1, $2);
> }
> + | ColLabel BINARY
> + {
> + $$ = makeDefElem($1, (Node *)
> makeString("binary"));
> + }
So, no that doesn't work.
--Simon Riggs http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: