]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix typos and grammar in graph table rewrite code
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 24 Apr 2026 06:27:04 +0000 (08:27 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 24 Apr 2026 06:27:04 +0000 (08:27 +0200)
Reported-by: Lakshmi N <lakshmin.jhs@gmail.com>
Author: Lakshmi N <lakshmin.jhs@gmail.com>
Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+3i_M9gpUGjH-BkJk=UFjK16jq9fEQHpmZ1cxpJO+xM4hWC+A@mail.gmail.com

src/backend/commands/propgraphcmds.c
src/backend/rewrite/rewriteGraphTable.c

index bea74b71b635922ed3349e8d9ee6996a0cb7066a..6d509fccf46baa687c3ca0b28d1ad647f771aa2c 100644 (file)
@@ -414,7 +414,7 @@ propgraph_edge_get_ref_keys(ParseState *pstate, const List *keycols, const List
                         * right operand. The method used to find the equality operators
                         * is similar to the method used to find equality operators for
                         * FK/PK comparison in ATAddForeignKeyConstraint() except that
-                        * opclass of the the vertex key type is used as a starting point.
+                        * opclass of the vertex key type is used as a starting point.
                         * Since we need only equality operators we use both BT and HASH
                         * strategies.
                         *
@@ -1045,7 +1045,7 @@ insert_property_record(Oid graphid, Oid ellabeloid, Oid pgerelid, const char *pr
  * makes it easier to share this code between CREATE PROPERTY GRAPH and ALTER
  * PROPERTY GRAPH.  We pass in the element OID so that ALTER PROPERTY GRAPH
  * only has to check the element it has just operated on.  CREATE PROPERTY
- * GROUP checks all elements it has created.
+ * GRAPH checks all elements it has created.
  */
 static void
 check_element_properties(Oid peoid)
@@ -1214,8 +1214,8 @@ check_element_label_properties(Oid ellabeloid)
 
        /*
         * Find a reference element label to fetch label properties.  The
-        * reference element label has to have the label OID as the one being
-        * checked but be distinct from the one being checked.
+        * reference element label has to have the same label OID as the one being
+        * checked but a different element OID.
         */
        ScanKeyInit(&key[0],
                                Anum_pg_propgraph_element_label_pgellabelid,
@@ -1237,7 +1237,7 @@ check_element_label_properties(Oid ellabeloid)
        table_close(rel, AccessShareLock);
 
        /*
-        * If there is not previous definition of this label, then we are done.
+        * If there is no previous definition of this label, then we are done.
         */
        if (!ref_ellabeloid)
                return;
@@ -1669,7 +1669,7 @@ AlterPropGraph(ParseState *pstate, const AlterPropGraphStmt *stmt)
        /*
         * Invalidate relcache entry of the property graph so that the queries in
         * the cached plans referencing the property graph will be rewritten
-        * considering changes to the propert graph.
+        * considering changes to the property graph.
         */
        CacheInvalidateRelcacheByRelid(pgrelid);
 
index 3aac29f5840b2effb57771f2256b01036b687799..6867de6d53af8bfd7af1e1fe4e5c564b1f48a2e2 100644 (file)
@@ -163,10 +163,10 @@ rewriteGraphTable(Query *parsetree, int rt_index)
  * done by generate_queries_for_path_pattern_recurse().
  * generate_query_for_graph_path() constructs a query for a given path.
  *
- * A path pattern may result into no path if any of the element pattern yields no
- * elements or edge patterns yield no edges connecting adjacent vertex patterns.
- * In such a case a dummy query which returns no result is returned
- * (generate_query_for_empty_path_pattern()).
+ * A path pattern may end up producing no path if any of the element patterns
+ * yields no elements or the edge patterns yield no edges connecting adjacent
+ * vertex patterns.  In such a case a dummy query which returns no result is
+ * returned (generate_query_for_empty_path_pattern()).
  *
  * 'path_pattern' is given path pattern to be applied on the property graph in
  * the GRAPH_TABLE clause represented by given 'rte'.
@@ -503,9 +503,9 @@ generate_query_for_graph_path(RangeTblEntry *rte, List *graph_path)
                 * SQL/PGQ standard (Ref. Section 11.19, Access rule 2 and General
                 * rule 4) does not specify whose access privileges to use when
                 * accessing the element tables: property graph owner's or current
-                * user's. It is safer to use current user's privileges so as not to
-                * make property graphs as a hole for unpriviledged data access. This
-                * is inline with the views being security_invoker by default.
+                * user's. It is safer to use current user's privileges to avoid
+                * unprivileged data access through a property graph. This is inline
+                * with the views being security_invoker by default.
                 */
                rel = table_open(pe->reloid, AccessShareLock);
                pni = addRangeTableEntryForRelation(make_parsestate(NULL), rel, AccessShareLock,