Re: [BUGS] casting strings to multidimensional arrays yields strange results - Mailing list pgsql-patches

From Tom Lane
Subject Re: [BUGS] casting strings to multidimensional arrays yields strange results
Date
Msg-id 14225.1091679580@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] casting strings to multidimensional arrays yields strange  (Joe Conway <mail@joeconway.com>)
Responses Re: [BUGS] casting strings to multidimensional arrays yields strange  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Joe Conway <mail@joeconway.com> writes:
> While looking at it the last day or so, I started to think it might be
> better to use bison to parse array literals -- or is that a bad idea?

Offhand it doesn't seem like a super-appropriate tool.  Once you get
past the lexical details like quoting, the syntax of array literals
is not complicated enough to need a bison parser.  Also, the issues
you're facing now like enforcing consistent dimensions are not amenable
to solution by a context-free grammar --- so you'd still need most of
the dimension-checking mechanisms.

There might be something out there that is more useful, but I dunno
what.

            regards, tom lane

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: [BUGS] casting strings to multidimensional arrays yields strange
Next
From: Michael Glaesemann
Date:
Subject: Re: Epoch to timestamp conversion function patch