~~~~~~~~~~~~~~~~~~~~~
- Expose the new ``pg_query_scan()`` function as ``parser.scan()``
- Expose the ``pg_query_parse()`` function as ``parser.parse_sql_json()``
- Expose the new ``pg_query_parse_protobuf()`` function as ``parser.parse_sql_protobuf()``
- Expose the new ``pg_query_deparse_protobuf()`` function as ``parser.deparse_protobuf()``
- Honor the ``catalogname`` of a ``RangeVar`` if present (`issue 71`__)
__ https://github.com/lelit/pglast/issues/71
- Cover almost all ``SQL`` statements, testing against the whole ``PostgreSQL`` `regression
suite`__ (`issue 68`__, `PR 72`__ and `PR 77`__), thanks to Ronan Dunklau and Hong Cheng
__ https://github.com/pganalyze/libpg_query/tree/13-latest/test/sql/postgres_regress_
__ https://github.com/lelit/pglast/issues/68
__ https://github.com/lelit/pglast/pull/72
__ https://github.com/lelit/pglast/pull/77
- New rudimentary support for the `preserve comments` feature (`issue 23`__)
__ https://github.com/lelit/pglast/issues/23
~~~~~~~~~~~~~~~~~~~~
**Breaking changes**
~~~~~~~~~~~~~~~~~~~~
- Target PostgreSQL 13
- The ``pglast.parser`` module exposes all ``libpg_query`` entry points, even the new
``pg_query_deparse_protobuf()`` function that is basically equivalent to
``RawStream``\ -based printer
- The ``split()`` function is now based on the lower level ``pg_query_split_with_xxx()``
functions
- The ``parse_sql()`` function returns native Python objects, not a ``JSON`` string as before:
all PG *nodes* are now represented by subclasses of ``pglast.ast.Node``, without exception,
even ``Expr`` and ``Value`` are there. The latter impacts on ``pglast.node.Scalar``: for
example it now may contains a ``ast.Integer`` instance instead of a Python ``int``
- The ``pgpp --parse-tree`` output is a `pprint`__ represention of the ``AST``, not a ``JSON``
string as before
__ https://docs.python.org/3.9/library/pprint.html#pprint.pprint
- The ``ParseError`` exception does not expose the ``location`` as an instance member anymore,
although its still there, as the second argument (ie ``.args[1]``); furthermore, its value
now corresponds to the index in the original Unicode string, instead of the offset in the
``UTF-8`` representation passed to the underlying C function
Version 2