The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/sql-select.html Description:
Dear PostgreSQL Team, I'm writing to seek clarification regarding the scope of the formal syntax outlined in the documentation for the SELECT statement (https://www.postgresql.org/account/comments/new/16/sql-select.html/). I understand that this syntax defines the core structure and rules for constructing valid queries. However, I'm interested in building an Object-Relational Mapper (ORM) for PostgreSQL. My primary question is: Does the documented formal syntax represent the absolute limit of what PostgreSQL can understand and process, or are there additional functionalities beyond these core rules? I'm particularly interested in how ORMs typically handle features like data type mapping, object-relational mapping, and support for advanced functionalities like subqueries and window functions. I'm asking this for clarity to avoid dedicating time to exploring the internal C parser code of PostgreSQL. I'd like to ensure the documented syntax serves as a reliable foundation for building an ORM, with the understanding that there might be additional functionalities beyond the core structure. Any insights you can provide on this topic would be greatly appreciated. Additionally, if there are resources beyond the formal syntax documentation that would be helpful for building a PostgreSQL ORM, I'd be grateful if you could point me in the right direction. Thank you for your time and assistance.