Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iHijd-00036w-Np for pgsql-sql@arkaria.postgresql.org; Tue, 08 Oct 2019 06:12:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iHijb-0000iQ-3s for pgsql-sql@arkaria.postgresql.org; Tue, 08 Oct 2019 06:12:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iHija-0000i1-MJ for pgsql-sql@lists.postgresql.org; Tue, 08 Oct 2019 06:12:34 +0000 Received: from mail-vk1-xa30.google.com ([2607:f8b0:4864:20::a30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iHijU-0005Lk-39 for pgsql-sql@lists.postgresql.org; Tue, 08 Oct 2019 06:12:33 +0000 Received: by mail-vk1-xa30.google.com with SMTP id s72so3530198vkh.5 for ; Mon, 07 Oct 2019 23:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Yo0vvCyi3nCLnReu8NHh5YnbU27NhQeYl9FW2Xice4k=; b=SgD0nORUejrXKo4ztrHVZFnT+Oagn9m2racYTrbzAUI6S2IG2VqlXVBLwRF5H9uChO a4E/BhBDKk50Io4354mV2O/gNOvSqBdAzaKtgs0xymtPt+lFBKQEng1YHqRMuqnPkXyw SC9vIAtOGRTywRkQnxaQ9A5ZFlPaj9rt4qmEmRTlQ2Vh2+JeB3Mj/4I3KIL3rDMXK91c vIS7xAc3F9bWOUpPYp0Td8bD8XHGSxmUf0eHbus93rGBhAJ33CydfG9YqXHZ8xw884hp li/vvS/uErwzOzg+TfLnAwU71zgkzhWZv/VypAU/IcykQBKJkzMEBTXORI+klLsgNDOr SMTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Yo0vvCyi3nCLnReu8NHh5YnbU27NhQeYl9FW2Xice4k=; b=fb5Nuo6uNm1rB0TwGfRYtLSKCs1FTZdVzI227riDl2x7eWaIcoU7uu56igFZUwb6rk 5Qjows6bxldTwisc42AzhHv42nkoHea9gM5/ySnQ7xeyiFeNTtFoZDmRoJ88undccLqV kz26IqCl+ObJgnegeXhWY1nmcBcnGuXjKaCIODtjLtXw/dwskfrESPa/S9btSxs+sS8r wRXmUnaqptzTUlMKx9w9SkZCjJnbjRTj+PPx8Pa7Sl+8xX75te0gWE3ddfDTlDtSsD7U 8oOYOE2m48kLyVtSYlUcPg9Vcoi3Uxg9kCdh50SvEXL/YGhaLLSUwZBiEGsdId4ekpwE bKfw== X-Gm-Message-State: APjAAAXvq3wdzT0+GPOdqMJTo4F4QhcmJ9AfZuVW6FOz2WWuNT3caN9y 5Jz6zlT2oHNfVtff454bRpfNI6T1yqraUveQCNo8g59hmXo= X-Google-Smtp-Source: APXvYqwWLd82C+03y67jUC3N8KqsLB7qweNYdVm6MrqMtzEfoJD3RKQDVh10mXLHcJGbBalFwYG58t2Hbx4JhMKzivE= X-Received: by 2002:a05:6122:2cf:: with SMTP id k15mr3746766vki.102.1570515146775; Mon, 07 Oct 2019 23:12:26 -0700 (PDT) MIME-Version: 1.0 From: Marius Andreiana Date: Tue, 8 Oct 2019 09:12:15 +0300 Message-ID: Subject: parser that could handle "FROM... SELECT..." as well as "SELECT... FROM..." To: pgsql-sql@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000007022150594600dec" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000007022150594600dec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Postgres folks, After reading https://jvns.ca/blog/2019/10/03/sql-queries-don-t-start-with-select/ and the discussions at https://news.ycombinator.com/item?id=3D21150606 I'd also like to write "FROM... SELECT..." instead of "SELECT... FROM...". Postgres doesn't support this though. Would it be possible to please add parsing support for this syntax as well? Somebody mentioned: Engines don=E2=80=99t run sql directly. They make an AST, make an intermedi= ate representation of instructions and then execute. So if it results in same AST, the parser should be flexible. Thanks! Marius --0000000000007022150594600dec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Postgres folks,

After reading
I'd also like to write=C2=A0"FROM... SELECT..= ." instead of "SELECT... FROM...".

= Postgres doesn't support this though. Would it be possible to please ad= d parsing support for this syntax as well?

Somebod= y mentioned:
Engines don=E2=80=99t run sql directly. They make an= AST, make an intermediate representation of instructions and then execute.=
So if it results in same AST, the parser should be flexible.=C2=A0
<= /div>

Thanks!
=
Marius
--0000000000007022150594600dec--