Re: What type of Compiler to SQL? Memory-Image (Load-and-Go) Format?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Wen Yi <chuxuec(at)outlook(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: What type of Compiler to SQL? Memory-Image (Load-and-Go) Format?
Date: 2023-05-05 01:51:28
Message-ID: 9BC420AC-94A7-4053-888D-795A98E1B0C5@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On May 4, 2023, at 18:00, Wen Yi <chuxuec(at)outlook(dot)com> 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.
> • Assembly Language Format
> • Relocatable Binary Format
> • 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 ?

Hi,

Those aren't really "types of compilers." They are different binary output formats that a compiler can generate.

PostgreSQL does not have an "SQL compiler" as such. (It does have Just-in-Time compilation for some operations, but that's almost certainly not what you are looking for.) It's an interpreter, in that it transforms the input language to an internal representation and then uses that for its execution, rather than reducing it all the way to machine language.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brainmue 2023-05-05 04:55:39 Re: RHEL repo package crc mismatches
Previous Message David G. Johnston 2023-05-05 01:43:53 Re: What type of Compiler to SQL? Memory-Image (Load-and-Go) Format?