diff --git a/LICENSE.POSTGRESQL b/LICENSE.POSTGRESQL new file mode 100644 index 0000000..0a39764 --- /dev/null +++ b/LICENSE.POSTGRESQL @@ -0,0 +1,23 @@ +PostgreSQL Database Management System +(also known as Postgres, formerly known as Postgres95) + +Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group + +Portions Copyright (c) 1994, The Regents of the University of California + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose, without fee, and without a written agreement +is hereby granted, provided that the above copyright notice and this +paragraph and the following two paragraphs appear in all copies. + +IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING +LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS +DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO +PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. diff --git a/README.md b/README.md index af5623b..bb8f912 100644 --- a/README.md +++ b/README.md @@ -451,6 +451,20 @@ Deeply nested queries, such as a long chain of operators without parentheses (`a Protobuf's own recursive operations on a parse tree, such as `ToString()`, `Clone()` and `Equals()`, run on your thread. On a very deeply nested tree they can still overflow a small stack. +## What's new in 2.0 + +- **PostgreSQL 18**: built on libpg_query 18.1.0, which uses the PostgreSQL 18.6 parser and includes its security fix for `pg_query_normalize`. +- **More platforms**: Linux on ARM64, Alpine and other musl-based Linux, and Windows on ARM64. The Linux and macOS libraries are now built against old OS baselines, so they load on older systems too (see the table under [Installation](#installation)). +- **.NET 10**, alongside .NET 8 and .NET 9, and compatibility with trimming and Native AOT. +- **New functions**: `IsUtilityStmt`, `Summary`, `DeparseComments` and `ParsePlpgsqlFunctions`. +- **Deparse options**: pretty printing and keeping comments, through `DeparseOptions`. +- **Fingerprint options**: `FingerprintOptions`, including a PostgreSQL 17 compatible mode. +- **Easier results**: `GetValueOrThrow`, `TryGetValue`, `Match` and deconstruction on `Result` (see [Working with results](#working-with-results)). +- **Parse tree navigation**: `Descendants`, `Walk`, `Unwrap`, `GetLocation` and `GetText` (see [Navigating the parse tree](#navigating-the-parse-tree)). +- **Correct offsets for non-ASCII text**: `Scan` and split results index the query string directly, with `Utf8OffsetMapper` and `Error.GetCursorCharOffset` for the rest (see [Offsets and non-ASCII text](#offsets-and-non-ascii-text)). +- **Safer input handling**: a `null` query, a NUL character or a deeply nested query no longer crashes the process or is silently cut short. +- **Package**: IntelliSense documentation, a symbol package and Source Link are included. + ## Upgrading from 1.x Version 2.0 moves from the PostgreSQL 17 parser to PostgreSQL 18, which changes some results: @@ -472,4 +486,4 @@ Copyright (c) 2026, Babu Annamalai Refer to [libpg_query license](https://github.com/pganalyze/libpg_query?tab=readme-ov-file#license) for license details on libpg_query. This project includes code derived from the [PostgreSQL project](http://www.postgresql.org/), -see LICENSE.POSTGRESQL for details. +see [LICENSE.POSTGRESQL](LICENSE.POSTGRESQL) for details.