Changeset: 98b17cf62eb7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/98b17cf62eb7
Modified Files:
        sql/server/sql_parser.y
Branch: Dec2025
Log Message:

Allow GEOMETRY 'some geometry string' in the parser.
Fixes #7810.


diffs (26 lines):

diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -6214,6 +6214,22 @@ literal:
                                YYABORT;
                        }
                }
+       |       GEOMETRY string
+               {
+                       sql_subtype t;
+                       atom *a = NULL;
+                       int r;
+
+                       if (!(r = sql_find_subtype(&t, "geometry", 0, 0))) {
+                               sqlformaterror(m, SQLSTATE(22000) "Type 
(geometry) unknown");
+                               YYABORT;
+                       }
+                       if (!(a = atom_general(SA, &t, $2, m->timezone))) {
+                               sqlformaterror(m, SQLSTATE(22000) "Incorrect 
geometry (%s)", $2);
+                               YYABORT;
+                       }
+                       $$ = _newAtomNode(a);
+               }
        |       aTYPE string
                {
                        sql_subtype t;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to