Обсуждение: The PostgreSQL Select Syntax

Поиск
Список
Период
Сортировка

The PostgreSQL Select Syntax

От
PG Doc comments form
Дата:
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.

Re: The PostgreSQL Select Syntax

От
Peter Eisentraut
Дата:
On 02.05.24 20:08, PG Doc comments form wrote:
> 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?

The documentation on those reference pages like the one you show for 
SELECT is intended to be a complete description of the syntax and 
semantics of the command.

But there is additional relevant information in other parts of the 
documentation, such as the basic elements SQL syntax, or the input and 
output formats of data types.