Details
-
Bug
-
Status: Open (View Workflow)
-
P3
-
Resolution: Won't Do
-
26.1.0
-
None
-
CP: Roadmap backlog
-
1
-
Core: Platform
Description
If a table name is a reserved word
https://www.postgresql.org/docs/current/sql-keywords-appendix.html
then the PostgreSQL error message syntax error at or near "." may arise.
Example: user is a reserved word. The query
select * from diku_mod_inventory_storage.user where user.jsonb is not null;
will therefore fail at the . of user.jsonb.
Option 1: Quote identifiers as described in https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
Example:
select * from "diku_mod_inventory_storage"."user" where "user".jsonb is not null;
Option 2: Disallow reserved words as table names. Add a check to RMB's SchemaMaker that throws an exception if any table name is a reserved word in PostgreSQL or SQL-92.
TestRail: Results
Attachments
Issue Links
- relates to
-
RMB-419 syntax error at or near "." because "user" table name in PgUtilIT is reserved word
-
- Closed
-