From nobody Mon Feb 07 11:47:51 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 98D3B19BDC99; Mon, 7 Feb 2022 11:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jsksh2V7bz3NnC; Mon, 7 Feb 2022 11:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644234472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UTCxMr2+mMPwUDh+WEPdLkMjHCW0qEgQT94sbiuwKiI=; b=TvoOXMbKy6OBJmbnv6X5ko6bMt9fz5JdRwj5uoaTY9jpSbH65BjdpAIGdHKpibEOkMTOw/ /Kt9klMh14hdMSZYdvET+SPW1jqm6+AIcwMd6YQ8z32ENoNEwVzdaRFimqKiv/evYLZ/g/ 632lFvLBz8mvx21+H/ARY5VjmfBntg0ajtqtQp2n3Oa2ooSm/mibsHvvAwJ6br3eQiBkdB 8RODGlhahFTXuK64qp2t5Hzz0yQuPo0TwjaEVXBXXrdb9cgfcP60yNXkCSSKRJvn1rGAE5 TXDZVXZ/8lScDbJ6bkNBvISV7GrAyQlzB+mff2aYFHZUfo5UjO1IBY939scdfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13EDB24DE0; Mon, 7 Feb 2022 11:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 217BlpCw011073; Mon, 7 Feb 2022 11:47:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217BlpJC011072; Mon, 7 Feb 2022 11:47:51 GMT (envelope-from git) Date: Mon, 7 Feb 2022 11:47:51 GMT Message-Id: <202202071147.217BlpJC011072@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Fechner Subject: git: b66e075a367c - main - databases/libpg_query: update to 13-2.1.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mfechner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b66e075a367c169889e04fc68d5de50556664759 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644234472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UTCxMr2+mMPwUDh+WEPdLkMjHCW0qEgQT94sbiuwKiI=; b=XvrLewrk+U0VDA1CQ3cvPloI4LFCFa5W7BxKL8bEgBWKmI07LsukLCWZgRuQ5v1Z58n8B1 xLlv3KS2gRaosgcTRX1DuRayD9u9/0y7PdRWT+tM26XWmUcSfCQz+1/7JwLTNSlJ1J/v/K uJNEyC9cta7dK+WJEQgRUgl7S3O4IE8jRFZZWicth0FVNrx0735TOW6AO9BX1XoCQGETiK ufhRyulvnXqiarQBXmeRy+dmr7ZsPfEUFEBYKjddA1qukRgGS3rBkforDkIN5tu4F30Vdi d5YV74BvlYrmGDgeWMOMxX+9In4/1s2D4lKVuRDJyno/8Tw+vlcAA4D2akIg9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644234472; a=rsa-sha256; cv=none; b=VL8s84QB3QcEZ6u1Q3AQyXCHjuUDiBkz4o5cf1I4GWGROoY/uUvVlQlwtpNhyEbvJIveCX O8ZgDD7yrjDnhbDvE7qT86hkeFzbTnnz0xrcChuI0YuTOVtQT02nO7iDRm1d8Nca3ZhXmH kcteI2KiUE8btxwdM0Sjgwu2gzfeouW2WQoobsTRgYOSDbb3GKnJcXKSpZq67EMaPRqgDa lLuW4fVQDhEjtsxli9AsYWYU5uPN5DnfVMLK7vbq4WhNASsHxJ6fFE1oL03FgcgwcI5AtL LmNOLpNwEJTLMHdotEQUtTSvikpEJS1PzLx4outRAzRmJnBU6fbmDw52XqG5+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=b66e075a367c169889e04fc68d5de50556664759 commit b66e075a367c169889e04fc68d5de50556664759 Author: Matthias Fechner AuthorDate: 2022-02-07 11:45:15 +0000 Commit: Matthias Fechner CommitDate: 2022-02-07 11:47:41 +0000 databases/libpg_query: update to 13-2.1.0 Changelog: https://github.com/pganalyze/libpg_query/blob/13-latest/CHANGELOG.md 13-2.1.0 2021-10-12 Normalize: add funcname error object #121 Normalize: Match GROUP BY against target list and re-use param refs #124 PL/pgSQL: Setup namespace items for parameters, support RECORD types #123 This significantly improves parsing for PL/pgSQL functions, to the extent that most functions should now parse successfully 13-2.0.7 2021-07-16 Normalize: Don't modify constants in TypeName typmods/arrayBounds fields (#118) This matches how pg_stat_statement behaves, and avoids causing parsing errors on the normalized statement Don't fail builds on systems that have strchrnul support (FreeBSD) 13-2.0.6 2021-06-29 Normalize: Don't touch "ORDER BY 1" expressions, keep original text #115 This avoids obscuring the semantic meaning of integers in the ORDER BY clause, which is to reference a particular column in the target list. 13-2.0.5 2021-06-24 Update to Postgres 13.3 patch release #114 Add optional Makefile target to build as shared library #100 Normalize: Don't touch "GROUP BY 1" type statements, keep original text #113 This avoids obscuring the semantic meaning of integers in the GROUP BY clause, which is to reference a particular column in the target list. Fingerprint: Cache list item hashes to fingerprint complex queries faster #112 This was exhibiting quite bad runtime behaviour before, causing both an explosion in memory, as well as very high CPU runtime for complex queries. The new approach ensures we don't calculate the hashes for a particular list more than once, which ensures that we roughly have quadratic runtime instead of exponential runtime. Deparser: Emit the RangeVar catalogname if present #105 Fix crash in pg_scan function when encountering backslash escapes #109 Integrate oss-fuzz fuzzer #106 13-2.0.4 2021-04-05 Deparser: Fix crash in CopyStmt with HEADER or FREEZE inside WITH parens The parse tree does not contain an explicit argument in those cases, but does when specified in the legacy mode without the wrapping WITH. With this change we only output the "1" argument when the original tree also had this, to ensure parse tree comparisons match. Note the intent here is technically the same, which is to enable these options. 13-2.0.3 2021-04-02 Normalize: Fix handling of two subsequent DefElem elements #96 We were incorrectly adding too many DefElem locations to the recorded constant values, causing a crash when more than a single DefElem is present in a utility statement. 13-2.0.2 2021-03-30 srcdata/nodetypes.json: Avoid bogus values accidentally parsed from inside comments 13-2.0.1 2021-03-30 Fix ARM builds: Avoid dependency on cpuid.h header Simplify deparser of TableLikeClause #91 Lele Gaifax Fix asprintf warnings by ensuring _GNU_SOURCE is set early enough 13-2.0.0 2021-03-18 Update to PostgreSQL 13 parser (13.2 release) Changes to JSON output format WARNING: These JSON format changes are incompatible with prior releases. New top-level result object that contains the Postgres version number the parser is based on Node type names are only output when the field is a generic field (Node*), but not when the field always has the same type. This matches how the Postgres source looks like, and ensures the JSON and (new) Protobuf format match in their structure. You can utilize the srcdata/struct_defs.json file as needed to get the necessary context on field types. Whitespace between control characters in JSON is no longer added "<" and ">" characters are escaped to avoid browser HTML injections Enum values are output with the value's name, instead of the integer value Introduce new Protobuf parse tree output format Up until now, this library relied on JSON to pass the parse result back to the caller, which has a number of downsides, most importantly that we don't have a readily available parser for JSON thats not tied to a running Postgres server. That in turn makes it hard to provide cross-language features such as deparsing directly in this library (which would require reading back a parse tree that gets passed in). Protobuf isn't perfect, but its straightforward enough to generate the schema definitions for the parse tree nodes, and output the tree using a bundled C protobuf library, which has a small enough SLOC count (~3k) to not be noticeable in the big picture. Add support for returning Postgres scanner result This allows utilizing pg_query for use cases that need the raw token information, instead of a parse tree. Due to additional modifications to the Postgres source, this also contains information about comments in the query string, and their location. Add deparsing functionality that turns parse tree back into a SQL query This is based on the deparser that was written over multiple years for the pg_query Ruby library, and is now accessible for all bindings through this new API and implementation. Fingerprinting: Introduce v3 version and 64-bit XXH3 hash See full details in the wiki page here: https://github.com/pganalyze/libpg_query/wiki/Fingerprinting#version-30-based-on-postgresql-13 Add new pg_query_split_with_scanner/pg_query_split_with_parser functions to split up multi-statement strings Naively one could assume that splitting a string by ";" is sufficient, but it becomes tricky once one takes into consideration that this character can also show up in identifier, constants or comments. We provide both a parser-based split function and a scanner-based split function. Most importantly when splitting statements in a file that may contain syntax errors that cause a parser error, but are accepted by the scanner. Otherwise the parser-based split function is recommended due to better accuracy. Add experimental Protobuf C++ outfuncs, converge JSON output to match Protobuf mapped output Extract source with USE_ASSERT_CHECKING enabled This ensures we have the necessary functions to compile an assert-enabled build if necessary. Note that this doesn't mean that asserts are enabled by default (they are not, you need to explicitly use DEBUG=1). Ensure codebase has a clean Valgrind run PL/pgSQL: Output NEW/OLD variable numbers, record dno fields Ethan Resnick Makefile: Allow passing in customized CFLAGS/PG_CONFIGURE_FLAGS/TEST_* Ethan Resnick 10-1.0.5 2021-02-17 Update to latest Postgres 10 patch release (10.16) Free Postgres top-level memory context on thread exit / with function Previously there was no way to free the top-level Postgres memory context, causing threaded programs that churn through a lot of threads to leak memory with each newly initialized thread-local top-level memory context. Instead, this uses a newly introduced cleanup method to free the memory when a pthread exits (note this causes a pthread dependency to be added to this library). In addition, primarily for memory testing purposes, add a new method "pg_query_exit" that performs the same cleanup on demand. Resolve correctness issues and possible memory leak in PL/pgSQL parser Add arch-ppc.h for PPC architectures #80 @pkubaj --- databases/libpg_query/Makefile | 6 +----- databases/libpg_query/distinfo | 8 +++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/databases/libpg_query/Makefile b/databases/libpg_query/Makefile index fed3d6b19e80..d9f3127434aa 100644 --- a/databases/libpg_query/Makefile +++ b/databases/libpg_query/Makefile @@ -1,13 +1,9 @@ # Created by: Matthias Fechner PORTNAME= libpg_query -DISTVERSION= 10-1.0.4 -PORTREVISION= 0 +DISTVERSION= 13-2.1.0 CATEGORIES= databases devel -PATCH_SITES= https://github.com/lfittl/libpg_query/commit/ -PATCHFILES= 820f5294f92927d6c4f61722bb28cf380942b83c.patch:-p1 - MAINTAINER= mfechner@FreeBSD.org COMMENT= C library for accessing the PostgreSQL parser outside of the server diff --git a/databases/libpg_query/distinfo b/databases/libpg_query/distinfo index 6e7d89244eec..1a30a425727a 100644 --- a/databases/libpg_query/distinfo +++ b/databases/libpg_query/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1609782591 -SHA256 (lfittl-libpg_query-10-1.0.4_GH0.tar.gz) = 88cc90296e5fcaaebd0b360c46698b7c5badddf86f120e249ef682a820d41338 -SIZE (lfittl-libpg_query-10-1.0.4_GH0.tar.gz) = 1508585 -SHA256 (820f5294f92927d6c4f61722bb28cf380942b83c.patch) = 3d528a6d72aac8a3aa04c64d2218c43de9818baf2b0cbe54e7a075cbf069436c -SIZE (820f5294f92927d6c4f61722bb28cf380942b83c.patch) = 2374 +TIMESTAMP = 1644225490 +SHA256 (lfittl-libpg_query-13-2.1.0_GH0.tar.gz) = a01329ae5bac19b10b8ddf8012bd663a20f85f180d6d7b900c1a1ca8444d19a5 +SIZE (lfittl-libpg_query-13-2.1.0_GH0.tar.gz) = 3541762