Update limitations for declarative partitioning

2020-08-07 Thread Erwin Brandstetter
The release notes for pg 13 advertise a new feature in
https://www.postgresql.org/docs/13/release-13.html#DDL-PARTITION-PRUNING

-
>
> Allow BEFORE row-level triggers
>  on partitioned tables
> (Álvaro Herrera)
>
> These triggers cannot change which partition is the destination.
>
- But the manual still warns at
https://www.postgresql.org/docs/13/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE-LIMITATIONS

BEFORE ROW triggers, if necessary, must be defined on individual
> partitions, not the partitioned table.
>

Looks like that "limitation" can go now? Or reduced to something like:

"BEFORE ROW triggers on the partitioned table cannot change which partition
is the destination."

Regards
Erwin


Re: obsolete indexing method "rtree"

2020-08-07 Thread Jürgen Purtz


On 06.08.20 10:12, David G. Johnston wrote:
On Thu, Aug 6, 2020 at 12:18 AM Jürgen Purtz > wrote:



> Why?

Because it can hinder the learning process.


FWIW I'd at least fixup comment.sgml to reference a current type.  And 
while in there might as well add missing examples for the following 
since we seem to have a goal of providing one example for every syntax 
(operators get two in order to show NONE, rightarg).


  EVENT TRIGGER object_name |
  PUBLICATION object_name |
  SUBSCRIPTION object_name |
  ROUTINE routine_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] 
) ] |


Such a "make current" patch that covers this complaint seems 
reasonable; IOW, why not if you are in there anyway - rtree has some 
baggage and no particular merit such that a different label would be 
worse.


I don't see the value of removing the backward compatibility hack if 
it's not bothering the developers.  Whether the documentation should 
be changed to basically only cover this and nothing more I cannot say 
without studying said documentation.  I agree with the general motive 
though.


David J.


Patch with four additional comments and one modified comment attached.

--

Jürgen Purtz


diff --git a/doc/src/sgml/ref/comment.sgml b/doc/src/sgml/ref/comment.sgml
index 965c5a40ad..fd7492a255 100644
--- a/doc/src/sgml/ref/comment.sgml
+++ b/doc/src/sgml/ref/comment.sgml
@@ -306,7 +306,7 @@ COMMENT ON TABLE mytable IS NULL;
Some more examples:
 
 
-COMMENT ON ACCESS METHOD rtree IS 'R-Tree access method';
+COMMENT ON ACCESS METHOD gin IS 'GIN index access method';
 COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance';
 COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4';
 COMMENT ON COLLATION "fr_CA" IS 'Canadian French';
@@ -316,6 +316,7 @@ COMMENT ON CONSTRAINT bar_col_cons ON bar IS 'Constrains column col';
 COMMENT ON CONSTRAINT dom_col_constr ON DOMAIN dom IS 'Constrains col of domain';
 COMMENT ON DATABASE my_database IS 'Development Database';
 COMMENT ON DOMAIN my_domain IS 'Email Address Domain';
+COMMENT ON EVENT TRIGGER abort_ddl IS 'Aborts all DDL commands';
 COMMENT ON EXTENSION hstore IS 'implements the hstore data type';
 COMMENT ON FOREIGN DATA WRAPPER mywrapper IS 'my foreign data wrapper';
 COMMENT ON FOREIGN TABLE my_foreign_table IS 'Employee Information in other database';
@@ -330,12 +331,15 @@ COMMENT ON OPERATOR CLASS int4ops USING btree IS '4 byte integer operators for b
 COMMENT ON OPERATOR FAMILY integer_ops USING btree IS 'all integer operators for btrees';
 COMMENT ON POLICY my_policy ON mytable IS 'Filter rows by users';
 COMMENT ON PROCEDURE my_proc (integer, integer) IS 'Runs a report';
+COMMENT ON PUBLICATION alltables IS 'Publishes all operations on all tables';
 COMMENT ON ROLE my_role IS 'Administration group for finance tables';
+COMMENT ON ROUTINE my_routine (integer, integer) IS 'Runs a routine (which is a function or procedure)';
 COMMENT ON RULE my_rule ON my_table IS 'Logs updates of employee records';
 COMMENT ON SCHEMA my_schema IS 'Departmental data';
 COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys';
 COMMENT ON SERVER myserver IS 'my foreign server';
 COMMENT ON STATISTICS my_statistics IS 'Improves planner row estimations';
+COMMENT ON SUBSCRIPTION alltables IS 'Subscription for all operations on all tables';
 COMMENT ON TABLE my_schema.my_table IS 'Employee Information';
 COMMENT ON TABLESPACE my_tablespace IS 'Tablespace for indexes';
 COMMENT ON TEXT SEARCH CONFIGURATION my_config IS 'Special word filtering';