postgresql/src/backend/catalog
Dean Rasheed 2bfb50b3df Improve reporting of "conflicting or redundant options" errors.
When reporting "conflicting or redundant options" errors, try to
ensure that errposition() is used, to help the user identify the
offending option.

Formerly, errposition() was invoked in less than 60% of cases. This
patch raises that to over 90%, but there remain a few places where the
ParseState is not readily available. Using errdetail() might improve
the error in such cases, but that is left as a task for the future.

Additionally, since this error is thrown from over 100 places in the
codebase, introduce a dedicated function to throw it, reducing code
duplication.

Extracted from a slightly larger patch by Vignesh C. Reviewed by
Bharath Rupireddy, Alvaro Herrera, Dilip Kumar, Hou Zhijie, Peter
Smith, Daniel Gustafsson, Julien Rouhaud and me.

Discussion: https://postgr.es/m/CALDaNm33FFSS5tVyvmkoK2cCMuDVxcui=gFrjti9ROfynqSAGA@mail.gmail.com
2021-07-15 08:49:45 +01:00
..
.gitignore Build in some knowledge about foreign-key relationships in the catalogs. 2021-02-02 17:11:55 -05:00
Catalog.pm Add index OID macro argument to DECLARE_INDEX 2021-06-29 08:08:40 +02:00
Makefile Improve error messages about mismatching relkind 2021-07-08 09:44:51 +02:00
aclchk.c Improve reporting of "conflicting or redundant options" errors. 2021-07-15 08:49:45 +01:00
catalog.c Message style improvements 2021-06-28 08:36:44 +02:00
dependency.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
genbki.pl genbki stricter error handling 2021-06-30 08:50:26 +02:00
heap.c Replace RelationOpenSmgr() with RelationGetSmgr(). 2021-07-12 17:01:36 -04:00
index.c Replace RelationOpenSmgr() with RelationGetSmgr(). 2021-07-12 17:01:36 -04:00
indexing.c Fix comment in indexing.c 2021-03-17 18:07:00 +09:00
information_schema.sql Add DISTINCT to information schema usage views 2021-04-21 11:54:47 +02:00
namespace.c Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
objectaccess.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
objectaddress.c Simplify some code in getObjectTypeDescription() 2021-06-12 16:29:11 +09:00
partition.c ALTER TABLE ... DETACH PARTITION ... CONCURRENTLY 2021-03-25 18:00:28 -03:00
pg_aggregate.c Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
pg_cast.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_class.c Improve error messages about mismatching relkind 2021-07-08 09:44:51 +02:00
pg_collation.c Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
pg_constraint.c Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
pg_conversion.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_db_role_setting.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_depend.c Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
pg_enum.c Rename "enum blacklist" to "uncommitted enums". 2021-01-05 12:38:48 +13:00
pg_inherits.c Message style improvements 2021-06-28 08:36:44 +02:00
pg_largeobject.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_namespace.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_operator.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_proc.c Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
pg_publication.c Add macro RelationIsPermanent() to report relation permanence 2021-03-22 20:23:52 -04:00
pg_range.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_shdepend.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
pg_subscription.c Add support for prepared transactions to built-in logical replication. 2021-07-14 07:33:50 +05:30
pg_type.c Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
sql_feature_packages.txt Cleanup in SQL features files 2020-03-28 08:46:18 +01:00
sql_features.txt Fix use of cursor sensitivity terminology 2021-04-07 08:05:55 +02:00
storage.c Replace RelationOpenSmgr() with RelationGetSmgr(). 2021-07-12 17:01:36 -04:00
system_functions.sql Remove pg_wait_for_backend_termination(). 2021-06-14 17:29:37 -07:00
system_views.sql Add support for prepared transactions to built-in logical replication. 2021-07-14 07:33:50 +05:30
toasting.c Improve error messages about mismatching relkind 2021-07-08 09:44:51 +02:00