[PATCH] fix wrong create table statement in documentation

Started by jotpeabout 8 years ago3 messages
#1jotpe
jotpe@posteo.de
1 attachment(s)

In the current documentation [1]https://www.postgresql.org/docs/10/static/ddl-partitioning.html#ddl-partitioning-declarative this create table statement is listed:

CREATE TABLE measurement_y2008m01 PARTITION OF measurement
FOR VALUES FROM ('2008-01-01') TO ('2008-02-01')
TABLESPACE fasttablespace
WITH (parallel_workers = 4);

But that did not work:

2017-11-06 22:26:11.757 CET [4699] ERROR: syntax error at or near
"WITH" at character 130
2017-11-06 22:26:11.757 CET [4699] STATEMENT: create table
measurement_y2008m01 partition of measurement for values from
('2008-01-01') to ('2008-02-01') tablespace fastspace WITH (
parallel_workers = 4 );

^
The TABLESPACE part should be listed behind the WITH storage parameter.
I attachted the patch.

[1]: https://www.postgresql.org/docs/10/static/ddl-partitioning.html#ddl-partitioning-declarative
https://www.postgresql.org/docs/10/static/ddl-partitioning.html#ddl-partitioning-declarative

Attachments:

correct_ddl_query_in_doc.patchtext/x-patch; name=correct_ddl_query_in_doc.patchDownload
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 03cbaa6..3f41939 100644
*** a/doc/src/sgml/ddl.sgml
--- b/doc/src/sgml/ddl.sgml
***************
*** 3095,3102 **** CREATE TABLE measurement_y2007m12 PARTITION OF measurement
  
  CREATE TABLE measurement_y2008m01 PARTITION OF measurement
      FOR VALUES FROM ('2008-01-01') TO ('2008-02-01')
!     TABLESPACE fasttablespace
!     WITH (parallel_workers = 4);
  </programlisting>
        </para>
  
--- 3095,3102 ----
  
  CREATE TABLE measurement_y2008m01 PARTITION OF measurement
      FOR VALUES FROM ('2008-01-01') TO ('2008-02-01')
!     WITH (parallel_workers = 4)
!     TABLESPACE fasttablespace;
  </programlisting>
        </para>
  
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: jotpe (#1)
Re: [PATCH] fix wrong create table statement in documentation

jotpe <jotpe@posteo.de> writes:

In the current documentation [1] this create table statement is listed:
CREATE TABLE measurement_y2008m01 PARTITION OF measurement
FOR VALUES FROM ('2008-01-01') TO ('2008-02-01')
TABLESPACE fasttablespace
WITH (parallel_workers = 4);

Yup, that's wrong. Fix pushed, thanks!

regards, tom lane

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

#3Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Tom Lane (#2)
Re: [PATCH] fix wrong create table statement in documentation

On 2017/11/09 7:21, Tom Lane wrote:

jotpe <jotpe@posteo.de> writes:

In the current documentation [1] this create table statement is listed:
CREATE TABLE measurement_y2008m01 PARTITION OF measurement
FOR VALUES FROM ('2008-01-01') TO ('2008-02-01')
TABLESPACE fasttablespace
WITH (parallel_workers = 4);

Yup, that's wrong. Fix pushed, thanks!

Oops! Thanks Tom for the fix.

Regards,
Amit

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