Lists: | pgsql-hackers |
---|
From: | mohsen soodkhah mohammadi <mohsensoodkhah(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | COPY TO |
Date: | 2013-11-23 06:48:22 |
Message-ID: | CAGT6x6dpM=aha=xwwb7s_sAm1QuVdOvTR6OMzO+-PrniRmHkug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
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.
From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | mohsen soodkhah mohammadi <mohsensoodkhah(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: COPY TO |
Date: | 2013-11-23 08:07:34 |
Message-ID: | CAB7nPqSWfZG-DL7hR10zB6Q=JaYfAkV4QSVb3mtEASf+PfF5eg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Have a look at
On Sat, Nov 23, 2013 at 3:48 PM, mohsen soodkhah mohammadi
<mohsensoodkhah(at)gmail(dot)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