Re: Request for Formal Syntax of WHERE Clause Conditions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mohamedhussein10445(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Request for Formal Syntax of WHERE Clause Conditions
Date: 2025-01-21 17:26:03
Message-ID: 3358480.1737480363@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> I am building a PostgreSQL parser and need a precise reference for the
> formal syntax of condition used in the WHERE clause.

We do not have one. You might be able to extract what you need from
our Bison grammar though:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/gram.y;h=d7f9c00c4099bd86c39ce79c997123a2a0ca6782;hb=HEAD

starting more or less from the a_expr production.

Keep in mind that this is a moving target, as we frequently add
new syntax features.

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2025-01-21 17:39:25 Re: Typo on tutorial window page
Previous Message Tom Lane 2025-01-21 16:53:24 Re: substring synopsis section, third argument is optional doc didn't show that