postgresql/src/include
Tomas Vondra fc4faea179 Rework examine_opclause_expression to use varonleft
The examine_opclause_expression function needs to return information on
which side of the operator we found the Var, but the variable was called
"isgt" which is rather misleading (it assumes the operator is either
less-than or greater-than, but it may be equality or something else).
Other places in the planner use a variable called "varonleft" for this
purpose, so just adopt the same convention here.

The code also assumed we don't care about this flag for equality, as
(Var = Const) and (Const = Var) should be the same thing. But that does
not work for cross-type operators, in which case we need to pass the
parameters to the procedure in the right order. So just use the same
code for all types of expressions.

This means we don't need to care about the selectivity estimation
function anymore, at least not in this code. We should only get the
supported cases here (thanks to statext_is_compatible_clause).

Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/8736jdhbhc.fsf%40ansel.ydns.eu
Backpatch-to: 12
2019-07-20 16:34:58 +02:00
..
access Fix nbtree metapage cache upgrade bug. 2019-07-18 13:22:54 -07:00
bootstrap Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
catalog Simplify pg_mcv_list (de)serialization 2019-07-05 16:45:05 +02:00
commands Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
common Update unicode_norm_table.h to Unicode 12.1.0 2019-06-24 22:50:56 +02:00
datatype Update copyright for 2019 2019-01-02 12:44:25 -05:00
executor Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
fe_utils Fix typos in various places 2019-06-03 13:44:03 +09:00
foreign Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
jit Fix duplicated words in comments 2019-05-14 09:37:35 +09:00
lib Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
libpq Switch position of some declarations in libpq.h 2019-06-09 11:33:52 +09:00
mb Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
nodes Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
optimizer Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
parser Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
partitioning Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
port Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
portability Update copyright for 2019 2019-01-02 12:44:25 -05:00
postmaster Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
regex Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
replication Mark ReplicationSlotCtl as PGDLLIMPORT. 2019-06-13 10:53:34 -04:00
rewrite Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Rework examine_opclause_expression to use varonleft 2019-07-20 16:34:58 +02:00
storage Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
tcop Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
tsearch Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
utils Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
fmgr.h Fix double-word typos 2019-06-13 10:03:56 -04:00
funcapi.h Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
getaddrinfo.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
getopt_long.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
miscadmin.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
pg_config.h.in Remove remaining traces of Rand_OpenSSL() from the tree 2019-06-27 08:25:26 +09:00
pg_config.h.win32 Stamp 12beta2. 2019-06-17 17:12:29 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_getopt.h Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
pg_trace.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgstat.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
pgtar.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
pgtime.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
port.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
postgres.h Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
rusagestub.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
windowapi.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00