pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Wen Yi <chuxuec@outlook.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: What type of Compiler to SQL? Memory-Image (Load-and-Go) Format?
Date: Thu, 4 May 2023 21:16:20 -0400
Message-ID: <ZFRY5JungV6HM0aW@momjian.us> (raw)
In-Reply-To: <TYAP286MB063667EC1939D2E9D18C5C4FA9729@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM>
References: <TYAP286MB063667EC1939D2E9D18C5C4FA9729@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM>

On Fri, May  5, 2023 at 01:00:37AM +0000, Wen Yi wrote:
> Hi team,
> I am a newbie to the postgres.
> When I am studying the compiler,the text book tell me there is there type of
> compiler.
> 
>  1. Assembly Language Format
>  2. Relocatable Binary Format
>  3. Memory-Image (Load-and-Go) Format
> 
> I check the postgres's sql compiler, and it's achieved by lex & yacc.
> So What type of Compiler to SQL? Is Memory-Image (Load-and-Go) Format ?

Lex and yacc load command-specific structures, or a Query structure for
SELECT, INSERT, UPDATE, DELETE, MERGE.

The Query structure is converted into a Plan which is executed by the
executor.  It is not compiled into assembly language.  See this:

	https://www.postgresql.org/developer/backend/

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

  Embrace your flaws.  They make you human, rather than perfect,
  which you will never be.





view thread (5+ messages)  latest in thread

Message-ID: <ZFRY5JungV6HM0aW@momjian.us>
Permalink:  ../ZFRY5JungV6HM0aW@momjian.us/
Also on:    postgresql.org/message-id/ZFRY5JungV6HM0aW@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bruce@momjian.us, chuxuec@outlook.com
  Subject: Re: What type of Compiler to SQL? Memory-Image (Load-and-Go) Format?
  In-Reply-To: <ZFRY5JungV6HM0aW@momjian.us>
  References: <TYAP286MB063667EC1939D2E9D18C5C4FA9729@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM> <ZFRY5JungV6HM0aW@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox