postgresql/src/include/catalog
Tom Lane c4d3cd3dc8 Fix array slicing of int2vector and oidvector values.
The previous coding labeled expressions such as pg_index.indkey[1:3] as
being of int2vector type; which is not right because the subscript bounds
of such a result don't, in general, satisfy the restrictions of int2vector.
To fix, implicitly promote the result of slicing int2vector to int2[],
or oidvector to oid[].  This is similar to what we've done with domains
over arrays, which is a good analogy because these types are very much
like restricted domains of the corresponding regular-array types.

A side-effect is that we now also forbid array-element updates on such
columns, eg while "update pg_index set indkey[4] = 42" would have worked
before if you were superuser (and corrupted your catalogs irretrievably,
no doubt) it's now disallowed.  This seems like a good thing since, again,
some choices of subscripting would've led to results not satisfying the
restrictions of int2vector.  The case of an array-slice update was
rejected before, though with a different error message than you get now.
We could make these cases work in future if we added a cast from int2[]
to int2vector (with a cast function checking the subscript restrictions)
but it seems unlikely that there's any value in that.

Per report from Ronan Dunklau.  Back-patch to all supported branches
because of the crash risks involved.
2013-11-23 20:04:00 -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 Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
dependency.h Allow extracting machine-readable object identity 2013-03-20 18:19:19 -03:00
duplicate_oids Make duplicate_oids return nonzero exit status if duplicates were found 2011-03-28 22:56:52 +03:00
genbki.h Update copyrights for 2013 2013-01-01 17:15:01 -05: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 Allow CREATE TABLE IF EXIST so succeed if the schema is nonexistent 2013-01-26 13:24:50 -05:00
objectaccess.h pgindent run for release 9.3 2013-05-29 16:58:43 -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 Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_attribute.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_auth_members.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_authid.h Update copyrights for 2013 2013-01-01 17:15:01 -05: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 pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_control.h Add buffer_std flag to MarkBufferDirtyHint(). 2013-06-17 08:04:18 -07: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 Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_default_acl.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_depend.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_description.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_enum.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_event_trigger.h pgindent run for release 9.3 2013-05-29 16:58:43 -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 Update copyrights for 2013 2013-01-01 17:15:01 -05: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 Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_operator.h pgindent run for release 9.3 2013-05-29 16:58:43 -04: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 Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -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 Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_seclabel.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_shdepend.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_shdescription.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_shseclabel.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_statistic.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_tablespace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_trigger.h Update copyrights for 2013 2013-01-01 17:15:01 -05: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 Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_ts_parser.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_ts_template.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_type.h Fix array slicing of int2vector and oidvector values. 2013-11-23 20:04:00 -05: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