parser that could handle "FROM... SELECT..." as well as "SELECT... FROM..."

Marius Andreiana <[email protected]> Tue, 8 Oct 2019 09:12:15 +0300
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <CAPUEYuYuJSRE_c_k+uBQReKUDZOMb3niiJ3mPuDP6AFdK_+piw@mail.gmail.com>
--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

<div dir=3D"ltr">Hello Postgres folks,<div><br></div><div>After reading</di=
v><div><a href=3D"https://jvns.ca/blog/2019/10/03/sql-queries-don-t-start-w=
ith-select/">https://jvns.ca/blog/2019/10/03/sql-queries-don-t-start-with-s=
elect/</a></div><div>and the discussions at=C2=A0<a href=3D"https://news.yc=
ombinator.com/item?id=3D21150606">https://news.ycombinator.com/item?id=3D21=
150606</a></div><div>I&#39;d also like to write=C2=A0&quot;FROM... SELECT..=
.&quot; instead of &quot;SELECT... FROM...&quot;.</div><div><br></div><div>=
Postgres doesn&#39;t support this though. Would it be possible to please ad=
d parsing support for this syntax as well?</div><div><br></div><div>Somebod=
y mentioned:</div><div>Engines don=E2=80=99t run sql directly. They make an=
 AST, make an intermediate representation of instructions and then execute.=
<br>So if it results in same AST, the parser should be flexible.=C2=A0<br><=
/div><div><br></div><div>Thanks!<br clear=3D"all"><div><div dir=3D"ltr" cla=
ss=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">=
<div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div=
 dir=3D"ltr">Marius</div></div></div></div></div></div></div></div></div></=
div></div></div></div>

--0000000000007022150594600dec--