agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Marius Andreiana <marius.andreiana@gmail.com>
Cc: pgsql-sql@lists.postgresql.org
Subject: Re: parser that could handle "FROM... SELECT..." as well as "SELECT... FROM..."
Date: Tue, 08 Oct 2019 10:29:30 -0400
Message-ID: <19446.1570544970@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRCsrM=2=Tz0=PGHntcWFSNV4ig4kxdY4sSRQ0M0t1QVhw@mail.gmail.com>
References: <CAPUEYuYuJSRE_c_k+uBQReKUDZOMb3niiJ3mPuDP6AFdK_+piw@mail.gmail.com>
<CAFj8pRCsrM=2=Tz0=PGHntcWFSNV4ig4kxdY4sSRQ0M0t1QVhw@mail.gmail.com>
Pavel Stehule <pavel.stehule@gmail.com> writes:
> Ășt 8. 10. 2019 v 8:12 odesĂlatel Marius Andreiana <
> marius.andreiana@gmail.com> napsal:
>> 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=21150606
>> I'd also like to write "FROM... SELECT..." instead of "SELECT... FROM...".
> Personally I don't see any benefit of proposed feature - It breaks
> portability of SQL queries (that is not high today).
The one advantage I could see to this is that, in principle,
it would allow tab-completion in the SELECT list to know
what column names to offer. Of course, making that actually
work would take a huge amount of effort, since psql's tab
completion "parser" is so lame.
On balance I agree that's not attractive enough to justify the
compatibility gotchas we'd be introducing. Postgres does have
some intentional deviations from the SQL standard, but they
seem to me to have better justifications than this one.
regards, tom lane
view thread (5+ messages)
Message-ID: <19446.1570544970@sss.pgh.pa.us>
Permalink: ../19446.1570544970@sss.pgh.pa.us/
Also on: postgresql.org/message-id/19446.1570544970@sss.pgh.pa.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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, marius.andreiana@gmail.com, pgsql-sql@lists.postgresql.org
Subject: Re: parser that could handle "FROM... SELECT..." as well as "SELECT... FROM..."
In-Reply-To: <19446.1570544970@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox