Adding column_constraint description in ALTER TABLE synopsis

Started by Lætitia Avrotabout 8 years ago11 messages
#1Lætitia Avrot
laetitia.avrot@gmail.com
1 attachment(s)

Hello,

As Amit Langot pointed out, the column_constraint definition is missing
whereas it is used in ALTER TABLE synopsis. It can be easily found in the
CREATE TABLE synopsis, but it's not very user friendly.

I simply copied/paste the column_constraint definition from the CREATE
TABLE synopsis to the ALTER TABLE synopsis. I also had to change the first
word "where" to "and" as it's not the first definition in that synopsis.

I choose to add it above table_constraint as column_constraint is used
before table_constraint.

The patch should apply to MASTER (or I messed up with git). I built and
tested it successfully on my laptop.

You will find enclosed my patch.

Regards,

Lætitia

Attachments:

adding_column_constraint_description_in_ALTER_TABLE_synopsis_v1.patchtext/x-patch; charset=US-ASCII; name=adding_column_constraint_description_in_ALTER_TABLE_synopsis_v1.patchDownload
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 41acda0..c02dc38 100644
*** a/doc/src/sgml/ref/alter_table.sgml
--- b/doc/src/sgml/ref/alter_table.sgml
***************
*** 85,90 **** ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
--- 85,104 ----
      OWNER TO { <replaceable class="parameter">new_owner</replaceable> | CURRENT_USER | SESSION_USER }
      REPLICA IDENTITY { DEFAULT | USING INDEX <replaceable class="parameter">index_name</replaceable> | FULL | NOTHING }
  
+ <phrase>and <replaceable class="parameter">column_constraint</replaceable> is:</phrase>
+ 
+ [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
+ { NOT NULL |
+   NULL |
+   CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] |
+   DEFAULT <replaceable>default_expr</replaceable> |
+   GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( <replaceable>sequence_options</replaceable> ) ] |
+   UNIQUE <replaceable class="parameter">index_parameters</replaceable> |
+   PRIMARY KEY <replaceable class="parameter">index_parameters</replaceable> |
+   REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
+     [ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ] }
+ [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+ 
  <phrase>and <replaceable class="parameter">table_constraint</replaceable> is:</phrase>
  
  [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
#2Stephen Frost
sfrost@snowman.net
In reply to: Lætitia Avrot (#1)
Re: Adding column_constraint description in ALTER TABLE synopsis

Greetings,

* Lætitia Avrot (laetitia.avrot@gmail.com) wrote:

As Amit Langot pointed out, the column_constraint definition is missing
whereas it is used in ALTER TABLE synopsis. It can be easily found in the
CREATE TABLE synopsis, but it's not very user friendly.

Agreed.

You will find enclosed my patch.

Thanks, this looks pretty reasonable, but did you happen to look for any
other keywords in the ALTER TABLE that should really be in ALTER TABLE
also?

I'm specifically looking at, at least, partition_bound_spec. Maybe you
could propose an updated patch which addresses that also, and any other
cases you find?

Thanks again!

Stephen

#3Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Stephen Frost (#2)
1 attachment(s)
Re: Adding column_constraint description in ALTER TABLE synopsis

On 2017/10/31 21:31, Stephen Frost wrote:

* L�titia Avrot (laetitia.avrot@gmail.com) wrote:

As Amit Langot pointed out, the column_constraint definition is missing
whereas it is used in ALTER TABLE synopsis. It can be easily found in the
CREATE TABLE synopsis, but it's not very user friendly.

Thanks, this looks pretty reasonable, but did you happen to look for any
other keywords in the ALTER TABLE that should really be in ALTER TABLE
also?

I'm specifically looking at, at least, partition_bound_spec. Maybe you
could propose an updated patch which addresses that also, and any other
cases you find?

Ah, yes. I remember having left out partition_bound_spec simply because I
thought it was kind of how it was supposed to be done, seeing that neither
column_constraint and table_constraint were expanded in the ALTER TABLE's
synopsis.

It seems that there are indeed a couple of other things that need to be
brought over to ALTER TABLE synopsis including partition_bound_spec.
9f295c08f877 [1]https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9f295c added table_constraint, but missed to add the description
of index_parameters and exclude_element which are referenced therein.

Attached find updated version of the L�titia's patch.

Thanks,
Amit

[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9f295c

Attachments:

adding_column_constraint_description_in_ALTER_TABLE_synopsis_v2.patchtext/plain; charset=UTF-8; name=adding_column_constraint_description_in_ALTER_TABLE_synopsis_v2.patchDownload
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 41acda003f..e059f87875 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -85,6 +85,20 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
     OWNER TO { <replaceable class="parameter">new_owner</replaceable> | CURRENT_USER | SESSION_USER }
     REPLICA IDENTITY { DEFAULT | USING INDEX <replaceable class="parameter">index_name</replaceable> | FULL | NOTHING }
 
+<phrase>and <replaceable class="parameter">column_constraint</replaceable> is:</phrase>
+
+[ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
+{ NOT NULL |
+  NULL |
+  CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] |
+  DEFAULT <replaceable>default_expr</replaceable> |
+  GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( <replaceable>sequence_options</replaceable> ) ] |
+  UNIQUE <replaceable class="parameter">index_parameters</replaceable> |
+  PRIMARY KEY <replaceable class="parameter">index_parameters</replaceable> |
+  REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
+    [ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ] }
+[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+
 <phrase>and <replaceable class="parameter">table_constraint</replaceable> is:</phrase>
 
 [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
@@ -96,6 +110,15 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
     [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ] }
 [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
 
+<phrase><replaceable class="parameter">index_parameters</replaceable> in <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>, and <literal>EXCLUDE</literal> constraints are:</phrase>
+
+[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ]
+[ USING INDEX TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
+
+<phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
+
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ <replaceable class="parameter">opclass</replaceable> ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+
 <phrase>and <replaceable class="parameter">table_constraint_using_index</replaceable> is:</phrase>
 
     [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
@@ -104,6 +127,13 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
 </synopsis>
  </refsynopsisdiv>
 
+<phrase>and <replaceable class="parameter">partition_bound_spec</replaceable> is:</phrase>
+
+IN ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | NULL } [, ...] ) |
+FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | MINVALUE | MAXVALUE } [, ...] )
+  TO ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | MINVALUE | MAXVALUE } [, ...] )
+</synopsis>
+
  <refsect1>
   <title>Description</title>
 
#4Lætitia Avrot
laetitia.avrot@gmail.com
In reply to: Amit Langote (#3)
Re: Adding column_constraint description in ALTER TABLE synopsis

Hi all,

Thanks Stephen for the suggestion. I wan't thinking globally enough. I was
planning to look at it today but Amit was faster. So thanks Amit too!

Have a nice day (UGT),

Lætitia

2017-11-01 1:35 GMT+01:00 Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>:

Show quoted text

On 2017/10/31 21:31, Stephen Frost wrote:

* Lætitia Avrot (laetitia.avrot@gmail.com) wrote:

As Amit Langot pointed out, the column_constraint definition is missing
whereas it is used in ALTER TABLE synopsis. It can be easily found in

the

CREATE TABLE synopsis, but it's not very user friendly.

Thanks, this looks pretty reasonable, but did you happen to look for any
other keywords in the ALTER TABLE that should really be in ALTER TABLE
also?

I'm specifically looking at, at least, partition_bound_spec. Maybe you
could propose an updated patch which addresses that also, and any other
cases you find?

Ah, yes. I remember having left out partition_bound_spec simply because I
thought it was kind of how it was supposed to be done, seeing that neither
column_constraint and table_constraint were expanded in the ALTER TABLE's
synopsis.

It seems that there are indeed a couple of other things that need to be
brought over to ALTER TABLE synopsis including partition_bound_spec.
9f295c08f877 [1] added table_constraint, but missed to add the description
of index_parameters and exclude_element which are referenced therein.

Attached find updated version of the Lætitia's patch.

Thanks,
Amit

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9f295c

#5Stephen Frost
sfrost@snowman.net
In reply to: Lætitia Avrot (#4)
Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

Greetings Lætitia, Amit,

* Lætitia Avrot (laetitia.avrot@gmail.com) wrote:

Thanks Stephen for the suggestion. I wan't thinking globally enough. I was
planning to look at it today but Amit was faster. So thanks Amit too!

This seems to have gotten lost in the shuffle, but Amit's patch still
applies cleanly and it looks like a good patch to me, so I've added it
to the current CF and marked it as Needs Review. There's been some
further discussion of this change over in this thread:

/messages/by-id/20171220090816.25744.72592@wrigleys.postgresql.org

which seemed to reach the conclusion that the proposed patch makes
sense.

If someone else would like to review it, that'd be great, otherwise I'll
probably get it committed soon.

Thanks!

Stephen

#6Thomas Munro
thomas.munro@enterprisedb.com
In reply to: Stephen Frost (#5)
Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

On Mon, Jan 15, 2018 at 2:32 PM, Stephen Frost <sfrost@snowman.net> wrote:

If someone else would like to review it, that'd be great, otherwise I'll
probably get it committed soon.

FYI the v2 doesn't build:

ref/alter_table.sgml:135: parser error : Opening and ending tag
mismatch: refentry line 6 and synopsis
</synopsis>
^
ref/alter_table.sgml:1534: parser error : chunk is not well balanced
</refentry>
^
ref/alter_table.sgml:1534: parser error : chunk is not well balanced
</refentry>
^

--
Thomas Munro
http://www.enterprisedb.com

#7Thomas Munro
thomas.munro@enterprisedb.com
In reply to: Thomas Munro (#6)
1 attachment(s)
Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

On Tue, Jan 23, 2018 at 12:41 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:

On Mon, Jan 15, 2018 at 2:32 PM, Stephen Frost <sfrost@snowman.net> wrote:

If someone else would like to review it, that'd be great, otherwise I'll
probably get it committed soon.

FYI the v2 doesn't build:

ref/alter_table.sgml:135: parser error : Opening and ending tag
mismatch: refentry line 6 and synopsis
</synopsis>

Here's an update to move the new stuff to the correct side of the
closing "</synopsis>". Builds for me, and the typesetting looks OK.
I'm not sure why the preexisting bogo-productions have inconsistent
indentation levels (looking at table_constraint_using_index) but
that's not this patch's fault.

--
Thomas Munro
http://www.enterprisedb.com

Attachments:

adding_column_constraint_description_in_ALTER_TABLE_synopsis_v3.patchapplication/octet-stream; name=adding_column_constraint_description_in_ALTER_TABLE_synopsis_v3.patchDownload
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 286c7a85897..c9d168535b4 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -85,6 +85,20 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
     OWNER TO { <replaceable class="parameter">new_owner</replaceable> | CURRENT_USER | SESSION_USER }
     REPLICA IDENTITY { DEFAULT | USING INDEX <replaceable class="parameter">index_name</replaceable> | FULL | NOTHING }
 
+<phrase>and <replaceable class="parameter">column_constraint</replaceable> is:</phrase>
+
+[ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
+{ NOT NULL |
+  NULL |
+  CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] |
+  DEFAULT <replaceable>default_expr</replaceable> |
+  GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( <replaceable>sequence_options</replaceable> ) ] |
+  UNIQUE <replaceable class="parameter">index_parameters</replaceable> |
+  PRIMARY KEY <replaceable class="parameter">index_parameters</replaceable> |
+  REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
+    [ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ] }
+[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+
 <phrase>and <replaceable class="parameter">table_constraint</replaceable> is:</phrase>
 
 [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
@@ -96,11 +110,26 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
     [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ] }
 [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
 
+<phrase><replaceable class="parameter">index_parameters</replaceable> in <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>, and <literal>EXCLUDE</literal> constraints are:</phrase>
+
+[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ]
+[ USING INDEX TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
+
+<phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
+
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ <replaceable class="parameter">opclass</replaceable> ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+
 <phrase>and <replaceable class="parameter">table_constraint_using_index</replaceable> is:</phrase>
 
     [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
     { UNIQUE | PRIMARY KEY } USING INDEX <replaceable class="parameter">index_name</replaceable>
     [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+
+<phrase>and <replaceable class="parameter">partition_bound_spec</replaceable> is:</phrase>
+
+IN ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | NULL } [, ...] ) |
+FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | MINVALUE | MAXVALUE } [, ...] )
+  TO ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | MINVALUE | MAXVALUE } [, ...] )
 </synopsis>
  </refsynopsisdiv>
 
#8Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Thomas Munro (#7)
1 attachment(s)
Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

On 2018/01/23 8:57, Thomas Munro wrote:

On Tue, Jan 23, 2018 at 12:41 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:

On Mon, Jan 15, 2018 at 2:32 PM, Stephen Frost <sfrost@snowman.net> wrote:

If someone else would like to review it, that'd be great, otherwise I'll
probably get it committed soon.

FYI the v2 doesn't build:

ref/alter_table.sgml:135: parser error : Opening and ending tag
mismatch: refentry line 6 and synopsis
</synopsis>

Here's an update to move the new stuff to the correct side of the
closing "</synopsis>". Builds for me, and the typesetting looks OK.
I'm not sure why the preexisting bogo-productions have inconsistent
indentation levels (looking at table_constraint_using_index) but
that's not this patch's fault.

Thanks for fixing that.

I noticed that partition_bound_spec in the patch is missing hash partition
bound syntax that was added after the original patch was written. Fixed
in the attached.

Thanks,
Amit

Attachments:

adding_column_constraint_description_in_ALTER_TABLE_synopsis_v4.patchtext/plain; charset=UTF-8; name=adding_column_constraint_description_in_ALTER_TABLE_synopsis_v4.patchDownload
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 286c7a8589..5cc0519c8c 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -85,6 +85,20 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
     OWNER TO { <replaceable class="parameter">new_owner</replaceable> | CURRENT_USER | SESSION_USER }
     REPLICA IDENTITY { DEFAULT | USING INDEX <replaceable class="parameter">index_name</replaceable> | FULL | NOTHING }
 
+<phrase>and <replaceable class="parameter">column_constraint</replaceable> is:</phrase>
+
+[ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
+{ NOT NULL |
+  NULL |
+  CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] |
+  DEFAULT <replaceable>default_expr</replaceable> |
+  GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( <replaceable>sequence_options</replaceable> ) ] |
+  UNIQUE <replaceable class="parameter">index_parameters</replaceable> |
+  PRIMARY KEY <replaceable class="parameter">index_parameters</replaceable> |
+  REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
+    [ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ] }
+[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+
 <phrase>and <replaceable class="parameter">table_constraint</replaceable> is:</phrase>
 
 [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
@@ -96,11 +110,27 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
     [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ] }
 [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
 
+<phrase><replaceable class="parameter">index_parameters</replaceable> in <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>, and <literal>EXCLUDE</literal> constraints are:</phrase>
+
+[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ]
+[ USING INDEX TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
+
+<phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
+
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ <replaceable class="parameter">opclass</replaceable> ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+
 <phrase>and <replaceable class="parameter">table_constraint_using_index</replaceable> is:</phrase>
 
     [ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
     { UNIQUE | PRIMARY KEY } USING INDEX <replaceable class="parameter">index_name</replaceable>
     [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+
+<phrase>and <replaceable class="parameter">partition_bound_spec</replaceable> is:</phrase>
+
+IN ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | NULL } [, ...] ) |
+FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | MINVALUE | MAXVALUE } [, ...] )
+  TO ( { <replaceable class="parameter">numeric_literal</replaceable> | <replaceable class="parameter">string_literal</replaceable> | MINVALUE | MAXVALUE } [, ...] ) |
+WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REMAINDER <replaceable class="parameter">numeric_literal</replaceable> )
 </synopsis>
  </refsynopsisdiv>
 
#9Stephen Frost
sfrost@snowman.net
In reply to: Amit Langote (#8)
Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

Greetings,

* Amit Langote (Langote_Amit_f8@lab.ntt.co.jp) wrote:

On 2018/01/23 8:57, Thomas Munro wrote:

On Tue, Jan 23, 2018 at 12:41 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:

On Mon, Jan 15, 2018 at 2:32 PM, Stephen Frost <sfrost@snowman.net> wrote:

If someone else would like to review it, that'd be great, otherwise I'll
probably get it committed soon.

FYI the v2 doesn't build:

ref/alter_table.sgml:135: parser error : Opening and ending tag
mismatch: refentry line 6 and synopsis
</synopsis>

Here's an update to move the new stuff to the correct side of the
closing "</synopsis>". Builds for me, and the typesetting looks OK.
I'm not sure why the preexisting bogo-productions have inconsistent
indentation levels (looking at table_constraint_using_index) but
that's not this patch's fault.

Thanks for fixing that.

I noticed that partition_bound_spec in the patch is missing hash partition
bound syntax that was added after the original patch was written. Fixed
in the attached.

I've pushed this with just a bit of re-ordering to match the order in
which things show up in the synopsis.

Thanks!

Stephen

#10Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Stephen Frost (#9)
Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

On 2018/02/02 19:41, Stephen Frost wrote:

* Amit Langote (Langote_Amit_f8@lab.ntt.co.jp) wrote:

On 2018/01/23 8:57, Thomas Munro wrote:

Here's an update to move the new stuff to the correct side of the
closing "</synopsis>". Builds for me, and the typesetting looks OK.
I'm not sure why the preexisting bogo-productions have inconsistent
indentation levels (looking at table_constraint_using_index) but
that's not this patch's fault.

Thanks for fixing that.

I noticed that partition_bound_spec in the patch is missing hash partition
bound syntax that was added after the original patch was written. Fixed
in the attached.

I've pushed this with just a bit of re-ordering to match the order in
which things show up in the synopsis.

Thank you Stephen.

Regards,
Amit

#11Lætitia Avrot
laetitia.avrot@gmail.com
In reply to: Amit Langote (#10)
Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

Hi,

Thank you all for this so warm reception for my very first patch.
Thanks Stephen to have thought to add that patch to the commit fest. As it
was committed Friday, I was able to tell the whole story in my talk and
that's great.
And thanks again to everyone who helped me with that patch.

Regards

Lætitia

Le 5 févr. 2018 01:36, "Amit Langote" <Langote_Amit_f8@lab.ntt.co.jp> a
écrit :

Show quoted text

On 2018/02/02 19:41, Stephen Frost wrote:

* Amit Langote (Langote_Amit_f8@lab.ntt.co.jp) wrote:

On 2018/01/23 8:57, Thomas Munro wrote:

Here's an update to move the new stuff to the correct side of the
closing "</synopsis>". Builds for me, and the typesetting looks OK.
I'm not sure why the preexisting bogo-productions have inconsistent
indentation levels (looking at table_constraint_using_index) but
that's not this patch's fault.

Thanks for fixing that.

I noticed that partition_bound_spec in the patch is missing hash

partition

bound syntax that was added after the original patch was written. Fixed
in the attached.

I've pushed this with just a bit of re-ordering to match the order in
which things show up in the synopsis.

Thank you Stephen.

Regards,
Amit