postgresql/src/include/catalog
Tom Lane 527ff8baf2 Fix assorted oversights in range selectivity estimation.
calc_rangesel() failed outright when comparing range variables to empty
constant ranges with < or >=, as a result of missing cases in a switch.
It also produced a bogus estimate for > comparison to an empty range.

On top of that, the >= and > cases were mislabeled throughout.  For
nonempty constant ranges, they managed to produce the right answers
anyway as a result of counterbalancing typos.

Also, default_range_selectivity() omitted cases for elem <@ range,
range &< range, and range &> range, so that rather dubious defaults
were applied for these operators.

In passing, rearrange the code in rangesel() so that the elem <@ range
case is handled in a less opaque fashion.

Report and patch by Emre Hasegeli, some additional work by me
2015-01-30 12:30:43 -05:00
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
catalog.h Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
catversion.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
dependency.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
duplicate_oids Make duplicate_oids return nonzero exit status if duplicates were found 2011-03-28 22:56:52 +03:00
genbki.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
heap.h Put back allow_system_table_mods check in heap_create(). 2013-06-03 17:22:31 +03:00
index.h Extend object-access hook machinery to support post-alter events. 2013-03-17 22:57:26 -04:00
indexing.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
namespace.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
objectaccess.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
objectaddress.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_aggregate.h JSON generation improvements. 2013-03-10 17:35:36 -04:00
pg_am.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_amop.h SP-GiST support of the range adjacent operator -|- 2013-03-08 15:03:19 +02:00
pg_amproc.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_attrdef.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_attribute.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_auth_members.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_authid.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_cast.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_class.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_collation.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_collation_fn.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_constraint.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_control.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_conversion.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_conversion_fn.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_database.h Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
pg_db_role_setting.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_default_acl.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_depend.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_description.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_enum.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_event_trigger.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_extension.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_foreign_data_wrapper.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_foreign_server.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_foreign_table.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_index.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_inherits.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_inherits_fn.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_language.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_largeobject.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_largeobject_metadata.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_namespace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_opclass.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_operator.h Fix assorted oversights in range selectivity estimation. 2015-01-30 12:30:43 -05:00
pg_opfamily.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_pltemplate.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_proc.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_proc_fn.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_range.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_rewrite.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_seclabel.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_shdepend.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_shdescription.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_shseclabel.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_statistic.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_tablespace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_trigger.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_ts_config.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_ts_config_map.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_ts_dict.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_ts_parser.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_ts_template.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_type.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_type_fn.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_user_mapping.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage_xlog.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
toasting.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
unused_oids Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00