Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qgLnV-00FPZ3-28 for pgsql-www@arkaria.postgresql.org; Wed, 13 Sep 2023 09:04:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qgLnT-00FzDQ-UM for pgsql-www@arkaria.postgresql.org; Wed, 13 Sep 2023 09:04:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qgI7h-00EWmT-Jo for pgsql-www@lists.postgresql.org; Wed, 13 Sep 2023 05:09:09 +0000 Received: from pb-sasl21.pobox.com ([173.228.157.49] helo=sasl.smtp.pobox.com) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qgI7W-004mMJ-9q for pgsql-www@postgresql.org; Wed, 13 Sep 2023 05:09:06 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl21.pobox.com (Postfix) with ESMTP id 9CBC728420 for ; Wed, 13 Sep 2023 01:08:52 -0400 (EDT) (envelope-from buckh@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=date:from :to:subject:message-id:mime-version:content-type; s=sasl; bh=K0X SiP3wdk8f4efTjcmpUvuAgrXa9GruAQ30xcR/r4s=; b=wpqz7AD+DYgd+eeVVCf fFWVPVsFl9QabzFsu4IdpRSHhYFM/yTRbOKaZCGOOKfGObtr8x6MJCn6tIgt4X0g kZdBSDsnYslApT1WDlFkmAtg3DUPZSs9Oqsopz2KHUWj2+H6TwxzRuwHcotVVzmX PTcRsqduSDYImZX7cQisSeSA= Received: from pb-sasl21.sea.icgroup.com (unknown [127.0.0.1]) by pb-sasl21.pobox.com (Postfix) with ESMTP id 87C302841D for ; Wed, 13 Sep 2023 01:08:52 -0400 (EDT) (envelope-from buckh@pobox.com) Received: from brain (unknown [71.163.166.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-sasl21.pobox.com (Postfix) with ESMTPSA id 86D2D2841A for ; Wed, 13 Sep 2023 01:08:48 -0400 (EDT) (envelope-from buckh@pobox.com) Received: from runt ([10.110.210.69]) by brain with esmtp (Exim 4.96) (envelope-from ) id 1qgI7K-006zA3-0y; Wed, 13 Sep 2023 01:08:46 -0400 Received: from buck by runt with local (Exim 4.96) (envelope-from ) id 1qgI7K-0004oO-0O; Wed, 13 Sep 2023 01:08:46 -0400 Date: Wed, 13 Sep 2023 01:08:46 -0400 From: Buck Huppmann To: pgsql-www@postgresql.org Subject: Wiki editor request Message-ID: <20230913050846.GA18473@runt> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Pobox-Relay-ID: 9F3EDF1C-51F3-11EE-BD9C-886C83653EBD-09703525!pb-sasl21.pobox.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello I would like permission to edit the postgresql parsers page to add the python pglast library to the list, as I've found it to be a perfect scratch for my itch, this itch being one of a python origin, and think it might do other people looking to that page for similar relief some good. The community account username I just signed up for is: sapito If you just wanna do the honors yourself, the page I want to edit is https://wiki.postgresql.org/wiki/Query_Parsing and the text I want to add is below, marked down. Thanks either way --buck #### pglast As an alternative to *sqlparse*, for Python use, there is [*pglast*](https://github.com/lelit/pglast), which, like [*pg_query*](#pg_query), mentioned above, also builds on the underlying machinery of [*libpq_query*](https://github.com/pganalyze/libpg_query) to make PostgreSQL's internal query parsing code and the elements of the parse tree available not only for validating and breaking down queries grammatically but also for building them up from parts, patching them, etc., and comes with pretty-printing and some PostgreSQL-specific functionality (rewriting comma-separated argument-list calls of builtin functions with the available stadardsy equivalent phrases, e.g.) for rendering to a range of outputs. #### Other *libpq_query* bindings The [*libpq_query* project README](https://github.com/pganalyze/libpg_query#readme) lists bindings in [a few other languages](https://github.com/pganalyze/libpg_query#resources) as well.