postgresql/src/include/catalog
Tom Lane 09d8d110a6 Use FLEXIBLE_ARRAY_MEMBER in a bunch more places.
Replace some bogus "x[1]" declarations with "x[FLEXIBLE_ARRAY_MEMBER]".
Aside from being more self-documenting, this should help prevent bogus
warnings from static code analyzers and perhaps compiler misoptimizations.

This patch is just a down payment on eliminating the whole problem, but
it gets rid of a lot of easy-to-fix cases.

Note that the main problem with doing this is that one must no longer rely
on computing sizeof(the containing struct), since the result would be
compiler-dependent.  Instead use offsetof(struct, lastfield).  Autoconf
also warns against spelling that offsetof(struct, lastfield[0]).

Michael Paquier, review and additional fixes by me.
2015-02-20 00:11:42 -05:00
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
binary_upgrade.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
catalog.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
catversion.h Add pg_stat_get_snapshot_timestamp() to show statistics snapshot timestamp. 2015-02-19 21:36:50 -05:00
dependency.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
duplicate_oids pgindent run for 9.4 2014-05-06 12:12:18 -04:00
genbki.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
heap.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
index.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
indexing.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
namespace.h Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
objectaccess.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
objectaddress.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_aggregate.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_am.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_amop.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_amproc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_attrdef.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_attribute.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_auth_members.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_authid.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_cast.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_class.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_collation.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_collation_fn.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_constraint.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_control.h Move pg_crc.c to src/common, and remove pg_crc_tables.h 2015-02-09 11:17:56 +02:00
pg_conversion.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_conversion_fn.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_database.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_db_role_setting.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_default_acl.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_depend.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_description.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_enum.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_event_trigger.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_extension.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_foreign_data_wrapper.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_foreign_server.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_foreign_table.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_index.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_inherits.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_inherits_fn.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_language.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_largeobject.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_largeobject_metadata.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_namespace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_opclass.h Tweak BRIN minmax operator class 2015-01-22 17:01:09 -03:00
pg_operator.h Fix assorted oversights in range selectivity estimation. 2015-01-30 12:30:59 -05:00
pg_opfamily.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_pltemplate.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_policy.h Clean up some mess in row-security patches. 2015-01-24 16:16:22 -05:00
pg_proc.h Add pg_stat_get_snapshot_timestamp() to show statistics snapshot timestamp. 2015-02-19 21:36:50 -05:00
pg_proc_fn.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_range.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_rewrite.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_seclabel.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_shdepend.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_shdescription.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_shseclabel.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_statistic.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_tablespace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_trigger.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_config.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_config_map.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_dict.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_parser.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_template.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_type.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_type_fn.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_user_mapping.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage_xlog.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
toasting.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
unused_oids Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00