Underscorces in copy-documentation (9.0 and higher)
Underscorces in copy-documentation (9.0 and higher)
От:
Mario Duhanic <duhanic@gmail.com>
Дата:
Hi,
- http://www.postgresql.org/docs/9.2/static/sql-copy.html,
- http://www.postgresql.org/docs/9.1/static/sql-copy.html and
- http://www.postgresql.org/docs/9.0/static/sql-copy.html
have underscores ("_") where there should be none,
e.g. in "FORCE_QUOTES".
Best regards,
Re: Underscorces in copy-documentation (9.0 and higher)
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Mario Duhanic writes:
> Hi,
> - http://www.postgresql.org/docs/9.2/static/sql-copy.html,
> - http://www.postgresql.org/docs/9.1/static/sql-copy.html and
> - http://www.postgresql.org/docs/9.0/static/sql-copy.html
> have underscores ("_") where there should be none,
> e.g. in "FORCE_QUOTES".
Huh? The references to FORCE_QUOTE look correct to me. The syntax
doesn't support multi-word option names, so it has to be like that
(or else run the words together, which doesn't sound like an
improvement).
regards, tom lane
Re: Underscorces in copy-documentation (9.0 and higher)
От:
Ian Lawrence Barwick <barwick@gmail.com>
Дата:
2013/3/20 Tom Lane :
> Mario Duhanic writes:
>> Hi,
>> - http://www.postgresql.org/docs/9.2/static/sql-copy.html,
>> - http://www.postgresql.org/docs/9.1/static/sql-copy.html and
>> - http://www.postgresql.org/docs/9.0/static/sql-copy.html
>
>> have underscores ("_") where there should be none,
>> e.g. in "FORCE_QUOTES".
>
> Huh? The references to FORCE_QUOTE look correct to me. The syntax
> doesn't support multi-word option names, so it has to be like that
> (or else run the words together, which doesn't sound like an
> improvement).
FWIW, multi-word option names are pre-9.0 syntax and still supported.
This is documented, albeit you have to scroll to the bottom of the page:
http://www.postgresql.org/docs/current/static/sql-copy.html#AEN66823
Regards
Ian Barwick
Fwd: Underscorces in copy-documentation (9.0 and higher)
От:
Mario Duhanic <duhanic@gmail.com>
Дата:
2013/3/20 Tom Lane : > Huh? The references to FORCE_QUOTE look correct to me. The syntax > doesn't support multi-word option names, so it has to be like that > (or else run the words together, which doesn't sound like an > improvement). Thanks, Tom, for your quick response. Maybe this is just a miscommunication, sorry for that then (i.e. I misunderstood the documentation here). (Stupid) example for the problem: "COPY (SELECT aggfnoid, aggtransfn from pg_aggregate) TO STDOUT WITH FORCE QUOTE * DELIMITER ',' CSV HEADER;" will run, a FORCE_QUOTE or FORCEQUOTE won't (e.g. on a "PostgreSQL 9.2.3 on i386-portbld-freebsd9.1, compiled by cc (GCC) 4.2.1 20070831 patched [FreeBSD]"). Best regards, Mario
Re: Underscorces in copy-documentation (9.0 and higher)
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Mario Duhanic writes: > 2013/3/20 Tom Lane : >> Huh? The references to FORCE_QUOTE look correct to me. The syntax >> doesn't support multi-word option names, so it has to be like that >> (or else run the words together, which doesn't sound like an >> improvement). > Thanks, Tom, for your quick response. > Maybe this is just a miscommunication, sorry for that then (i.e. I > misunderstood the documentation here). > (Stupid) example for the problem: > "COPY (SELECT aggfnoid, aggtransfn from pg_aggregate) TO STDOUT WITH > FORCE QUOTE * DELIMITER ',' CSV HEADER;" > will run, a FORCE_QUOTE or FORCEQUOTE won't As Ian notes, that's the old syntax with a hard-wired option set. The lack of parentheses after WITH is the difference. regards, tom lane