Subject: Underscorces in copy-documentation (9.0 and higher)

From: Mario Duhanic <[email-masked]>
Date: Wed, 20 Mar 2013 11:48:31 +0100

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,

---

From: Tom Lane <[email-masked]>
Date: Wed, 20 Mar 2013 10:05:49 -0400

> have underscores ("_") where there should be none,

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 ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

---

From: Ian Lawrence Barwick <[email-masked]>
Date: Wed, 20 Mar 2013 23:49:10 +0900

> (or else run the words together, which doesn't sound like an

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

---

From: Mario Duhanic <[email-masked]>
Date: Wed, 20 Mar 2013 15:50:05 +0100

> (or else run the words together, which doesn't sound like an

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

---

From: Tom Lane <[email-masked]>
Date: Wed, 20 Mar 2013 10:53:10 -0400

> 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

---

From: Mario Duhanic <[email-masked]>
Date: Wed, 20 Mar 2013 16:01:04 +0100

2013/3/20 Tom Lane <[email-masked]>
> The lack of parentheses after WITH is the difference.

Aarfh, thanks, guys!