Thread: COPY TO

COPY TO

From
mohsen soodkhah mohammadi
Date:
hello.
in copy.c is one function that its name is CopyOneRowTO.
in this function have one foreach loop. in this loop first if have this condition: !cstate->binary
what means this condition and when true this condition?
thank you.

Re: COPY TO

From
Michael Paquier
Date:
Have a look at

On Sat, Nov 23, 2013 at 3:48 PM, mohsen soodkhah mohammadi
<mohsensoodkhah@gmail.com> wrote:
> in copy.c is one function that its name is CopyOneRowTO.
> in this function have one foreach loop. in this loop first if have this
> condition: !cstate->binary
> what means this condition and when true this condition?
Have a look at CopyStateData at the top of
src/backend/commands/copy.c. This flag simply means that COPY uses the
binary format, that can be used with more or less this command:
COPY ... WITH [ FORMAT ] BINARY;
You can check as well the documentation for more details:
http://www.postgresql.org/docs/9.3/static/sql-copy.html

Regards,
-- 
Michael