Underscorces in copy-documentation (9.0 and higher)

Started by Mario Duhanicabout 13 years ago6 messagesdocs
Jump to latest
#1Mario Duhanic
duhanic@gmail.com
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mario Duhanic (#1)
Re: Underscorces in copy-documentation (9.0 and higher)

Mario Duhanic <duhanic@gmail.com> 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

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#3Ian Lawrence Barwick
barwick@gmail.com
In reply to: Tom Lane (#2)
Re: Underscorces in copy-documentation (9.0 and higher)

2013/3/20 Tom Lane <tgl@sss.pgh.pa.us>:

Mario Duhanic <duhanic@gmail.com> 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

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#4Mario Duhanic
duhanic@gmail.com
In reply to: Mario Duhanic (#1)
Fwd: Underscorces in copy-documentation (9.0 and higher)

2013/3/20 Tom Lane <tgl@sss.pgh.pa.us>:

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

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mario Duhanic (#1)
Re: Underscorces in copy-documentation (9.0 and higher)

Mario Duhanic <duhanic@gmail.com> writes:

2013/3/20 Tom Lane <tgl@sss.pgh.pa.us>:

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

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#6Mario Duhanic
duhanic@gmail.com
In reply to: Tom Lane (#5)
Re: Underscorces in copy-documentation (9.0 and higher)

2013/3/20 Tom Lane <tgl@sss.pgh.pa.us>

As Ian notes, that's the old syntax with a hard-wired option set.
The lack of parentheses after WITH is the difference.

Aarfh, thanks, guys!

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs