[openjpa] branch master updated: OPENJPA-2868 update invalid column names for PostgreSQL

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[openjpa] branch master updated: OPENJPA-2868 update invalid column names for PostgreSQL

struberg
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a7adde  OPENJPA-2868 update invalid column names for PostgreSQL
6a7adde is described below

commit 6a7addea165174ada761297d9213b2afcff904bd
Author: Mark Struberg <[hidden email]>
AuthorDate: Tue May 4 08:02:40 2021 +0200

    OPENJPA-2868 update invalid column names for PostgreSQL
---
 .../openjpa/jdbc/sql/PostgresDictionary.java       | 26 ++++++++++++----------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
index dd47fc2..9fbdbad 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
@@ -191,19 +191,21 @@ public class PostgresDictionary extends DBDictionary {
 
         // reservedWordSet subset that CANNOT be used as valid column names
         // (i.e., without surrounding them with double-quotes)
+        // generated at 2021-05-03T10:44:58.562 via org.apache.openjpa.reservedwords.ReservedWordsIT
         invalidColumnWordSet.addAll(Arrays.asList(new String[] {
-            "ALL", "AND", "ANY", "AS", "ASC", "AUTHORIZATION", "BETWEEN",
-            "BINARY", "BOTH", "CASE", "CAST", "CHECK", "COLLATE", "COLUMN",
-            "CONSTRAINT", "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_TIME",
-            "CURRENT_TIMESTAMP", "CURRENT_USER", "DEFAULT", "DEFERRABLE",
-            "DESC", "DISTINCT", "DO", "ELSE", "END", "END", "EXCEPT", "FALSE",
-            "FOR", "FOREIGN", "FROM", "FULL", "GRANT", "GROUP", "HAVING", "IN",
-            "INITIALLY", "INNER", "INTERSECT", "INTO", "IS", "ISNULL", "JOIN", "KEY",
-            "LEADING", "LEFT", "LIKE", "NATURAL", "NOT", "NOTNULL", "NULL",
-            "ON", "ONLY", "OR", "ORDER", "OUTER", "OVERLAPS", "PRIMARY",
-            "REFERENCES", "RIGHT", "SELECT", "SESSION_USER", "SOME", "TABLE",
-            "THEN", "TO", "TRAILING", "TRUE", "UNION", "UNIQUE", "USER",
-            "USING", "VERBOSE", "WHEN", "WHERE",
+            "ALL", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY", "AS", "ASC", "ASYMMETRIC", "AUTHORIZATION", "BINARY", "BOTH",
+            "CASE", "CAST", "CHECK", "COLLATE", "COLLATION", "COLUMN", "CONSTRAINT", "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_ROLE",
+            "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DEFAULT", "DEFERRABLE", "DESC", "DISTINCT", "DO", "ELSE",
+            "END", "END-EXEC", "EXCEPT", "FALSE", "FETCH", "FOR", "FOREIGN", "FREEZE", "FROM", "FULL", "GRANT", "GROUP", "HAVING",
+            "ILIKE", "IN", "INITIALLY", "INNER", "INTERSECT", "INTO", "IS", "ISNULL", "JOIN", "LATERAL", "LEADING", "LEFT",
+            "LIKE", "LIMIT", "LOCALTIME", "LOCALTIMESTAMP", "NATURAL", "NOT", "NOTNULL", "NULL", "OFFSET", "ON", "ONLY", "OR",
+            "ORDER", "OUTER", "OVERLAPS", "PLACING", "PRIMARY", "REFERENCES", "RIGHT", "SELECT", "SESSION_USER", "SIMILAR",
+            "SOME", "SYMMETRIC", "TABLE", "TABLESAMPLE", "THEN", "TO", "TRAILING", "TRUE", "UNION", "UNIQUE", "USER", "USING",
+            "VERBOSE", "WHEN", "WHERE", "WINDOW", "WITH",
+            // end generated.
+            // The following keywords used to be defined as reserved words in the past, but now seem to work
+            // we still add them for compat reasons
+            "BETWEEN",
         }));
 
         _timestampTypes.add("ABSTIME");