postgresql/src/include
Peter Eisentraut 23d0b48468 Remove hardcoded hash opclass function signature exceptions
hashvalidate(), which validates the signatures of support functions
for the hash AM, contained several hardcoded exceptions.  For example,
hash/date_ops support function 1 was hashint4(), which would
ordinarily fail validation because the function argument is int4, not
date.  But this works internally because int4 and date are of the same
size.  There are several more exceptions like this that happen to work
and were allowed historically but would now fail the function
signature validation.

This patch removes those exceptions by providing new support functions
that have the proper declared signatures.  They internally share most
of the code with the "wrong" functions they replace, so the behavior
is still the same.

With the exceptions gone, hashvalidate() is now simplified and relies
fully on check_amproc_signature().

hashvarlena() and hashvarlenaextended() are kept in pg_proc.dat
because some extensions currently use them to build hash functions for
their own types, and we need to keep exposing these functions as
"LANGUAGE internal" functions for that to continue to work.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/29c3b746-69e7-482a-b37c-dbbf7e5b009b@eisentraut.org
2024-09-12 12:57:43 +02:00
..
access Move logic related to WAL replay of Heap/Heap2 into its own file 2024-09-12 13:32:05 +09:00
archive Add macro for customizing an archiving WARNING message. 2024-03-04 15:41:42 -06:00
backup Align blocks in incremental backups to BLCKSZ 2024-04-05 16:30:01 +02:00
bootstrap Update copyright for 2024 2024-01-03 20:49:05 -05:00
catalog Remove hardcoded hash opclass function signature exceptions 2024-09-12 12:57:43 +02:00
commands Introduce an RTE for the grouping step 2024-09-10 12:35:34 +09:00
common common/jsonapi: support libpq as a client 2024-09-11 09:01:07 +02:00
datatype Update copyright for 2024 2024-01-03 20:49:05 -05:00
executor Log the conflicts while applying changes in logical replication. 2024-08-20 08:35:11 +05:30
fe_utils Improve file header comments for astramer code. 2024-08-07 08:49:41 -04:00
foreign Clean up more indent breakage from 6377e12a5. 2024-04-16 13:00:40 -04:00
jit Move resowner from common JitContext to LLVM specific 2024-07-19 10:27:06 +03:00
lib Implement pg_wal_replay_wait() stored procedure 2024-08-02 21:16:56 +03:00
libpq Add PQfullProtocolVersion() to surface the precise protocol version. 2024-09-09 11:54:55 -04:00
mb Inline basic UTF-8 functions. 2024-03-20 09:40:57 -07:00
nodes Introduce an RTE for the grouping step 2024-09-10 12:35:34 +09:00
optimizer Mark expressions nullable by grouping sets 2024-09-10 12:36:48 +09:00
parser Introduce an RTE for the grouping step 2024-09-10 12:35:34 +09:00
partitioning Revert support for ALTER TABLE ... MERGE/SPLIT PARTITION(S) commands 2024-08-24 18:48:48 +03:00
pch Update copyright for 2024 2024-01-03 20:49:05 -05:00
port Add prefetching support on macOS 2024-08-28 07:28:27 +02:00
portability Fix datatypes in comments in instr_time.h 2024-08-06 22:15:55 +03:00
postmaster Apply PGDLLIMPORT markings to some GUC variables 2024-08-14 11:36:12 +02:00
regex Cope with <regex.h> name clashes. 2024-07-06 10:27:16 +12:00
replication Collect statistics about conflicts in logical replication. 2024-09-04 08:55:21 +05:30
rewrite Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
snowball Update copyright for 2024 2024-01-03 20:49:05 -05:00
statistics Update copyright for 2024 2024-01-03 20:49:05 -05:00
storage Add block_range_read_stream_cb(), to deduplicate code. 2024-09-03 10:46:20 -07:00
tcop Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:33 -07:00
tsearch Constify fields and parameters in spell.c 2024-08-06 23:04:51 +03:00
utils Adjust tuplestore stats API 2024-09-12 16:02:01 +12:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Add macro to disable address safety instrumentation 2024-04-06 12:20:40 +07:00
fmgr.h Remove _PG_fini() 2024-08-21 07:24:03 +09:00
funcapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
getopt_long.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
meson.build meson: Restore implicit warning/debug/optimize flags for extensions 2024-06-07 09:36:26 +02:00
miscadmin.h Use pgBufferUsage for buffer usage tracking in analyze. 2024-08-13 18:49:45 -07:00
pg_config.h.in Remove support for OpenSSL older than 1.1.0 2024-09-02 13:51:48 +02: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.meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_config_manual.h Add prefetching support on macOS 2024-08-28 07:28:27 +02:00
pg_getopt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_trace.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat.h Collect statistics about conflicts in logical replication. 2024-09-04 08:55:21 +05:30
pgtar.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgtime.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
port.h More use of getpwuid_r() directly 2024-09-02 09:04:30 +02:00
postgres.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
postgres_ext.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
postgres_fe.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
varatt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
windowapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00