agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: mohamedhussein10445@gmail.com
To: pgsql-docs@lists.postgresql.org
Subject: Re: Formal Syntax of PL/pgSQL
Date: Thu, 5 Dec 2024 11:44:34 -0500
Message-ID: <Z1HYcvUt9_ntAOO2@momjian.us> (raw)
In-Reply-To: <173340919600.2556776.5021231474261341976@wrigleys.postgresql.org>
References: <173340919600.2556776.5021231474261341976@wrigleys.postgresql.org>

On Thu, Dec  5, 2024 at 02:33:16PM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/17/index.html
> Description:
> 
> I am currently working on a project that involves analyzing and building AST
> (Abstract Syntax Tree) interfaces for PL/pgSQL in TypeScript. My goal is to
> model the entire syntax of PL/pgSQL comprehensively, covering all its
> constructs exactly as they are understood syntactically by PostgreSQL when
> processing functions or procedures.
> 
> While exploring the official documentation, I noticed that commands like
> CREATE TABLE or SELECT are documented with clear and formalized syntax
> structures, which are incredibly helpful for developers needing to parse or
> programmatically interact with these commands. However, for PL/pgSQL, I
> couldn't find a similar consolidated syntax reference. For instance, while
> the documentation explains the supported declarations, control structures,
> and statements, it lacks a unified formal syntax block that encapsulates the
> entire language as PostgreSQL interprets it.
> 
> Would it be possible to provide such a formal syntax reference for PL/pgSQL,
> or point me toward an existing resource that captures this? Having access to
> a detailed and comprehensive syntax description would be immensely helpful
> for projects requiring precise parsing and manipulation of PL/pgSQL code.

I doubt it since no one has ever asked for this before, and we usually
tell them to look at the plpgsql parser if they want those details.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.







view thread (3+ messages)  latest in thread

Message-ID: <Z1HYcvUt9_ntAOO2@momjian.us>
Permalink:  ../Z1HYcvUt9_ntAOO2@momjian.us/
Also on:    postgresql.org/message-id/Z1HYcvUt9_ntAOO2@momjian.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, mohamedhussein10445@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Formal Syntax of PL/pgSQL
  In-Reply-To: <Z1HYcvUt9_ntAOO2@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox