Tom Lane wrote:
Hmm. There's some merit in that position, but consider this: we are
encouraging people rather strongly to move to the add_missing_from=false
behavior. So add_missing_from=true could be seen as a testing situation
in which you'd like to know which of your queries have a problem,
Hi Neil,
Looking at how to implement this, there is some rather dodgy code in
warnAutoRange() in parse_relation.c that only emits the notice about
adding a missing FROM clause entry if the query already has at least
one
range table entry in its FROM clause. The idea appears to be to not
Euler Taveira de Oliveira wrote:
Could you provide a patch?
Sure, a revised patch is attached. Note that this change will also
require updating 25 (!) of the regression tests, since they use the
SELECT-without-FROM syntax. I will update the tests (by adding an
explicit FROM clause) before
Neil Conway wrote:
Attached is a patch that applies the same optimization to int2_sum(),
int4_sum(), float4_accum(), and float8_accum(). It wasn't possible to
optimize do_numeric_accum() or int8_sum() since they both use numerics.
Applied.
-Neil
---(end of
Neil Conway wrote:
Sure, a revised patch is attached. Note that this change will also
require updating 25 (!) of the regression tests, since they use the
SELECT-without-FROM syntax.
I've applied the attached patch to HEAD. Due to the widespread updates
to the regression tests, the tests for