mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-29 22:49:41 +03:00 
			
		
		
		
	This feature set did not handle empty ranges correctly, and it's now
too late for PostgreSQL 17 to fix it.
The following commits are reverted:
    6db4598fcb Add stratnum GiST support function
    46a0cd4cef Add temporal PRIMARY KEY and UNIQUE constraints
    86232a49a4 Fix comment on gist_stratnum_btree
    030e10ff1a Rename pg_constraint.conwithoutoverlaps to conperiod
    a88c800deb Use daterange and YMD in without_overlaps tests instead of tsrange.
    5577a71fb0 Use half-open interval notation in without_overlaps tests
    34768ee361 Add temporal FOREIGN KEY contraints
    482e108cd3 Add test for REPLICA IDENTITY with a temporal key
    c3db1f30cb doc:  clarify PERIOD and WITHOUT OVERLAPS in CREATE TABLE
    144c2ce0cc Fix ON CONFLICT DO NOTHING/UPDATE for temporal indexes
Discussion: https://www.postgresql.org/message-id/d0b64a7a-dfe4-4b84-a906-c7dedfa40a3e@eisentraut.org
		
	
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * contrib/btree_gist/btree_gist.c
 | |
|  */
 | |
| #include "postgres.h"
 | |
| 
 | |
| #include "utils/builtins.h"
 | |
| 
 | |
| PG_MODULE_MAGIC;
 | |
| 
 | |
| PG_FUNCTION_INFO_V1(gbt_decompress);
 | |
| PG_FUNCTION_INFO_V1(gbtreekey_in);
 | |
| PG_FUNCTION_INFO_V1(gbtreekey_out);
 | |
| 
 | |
| /**************************************************
 | |
|  * In/Out for keys
 | |
|  **************************************************/
 | |
| 
 | |
| 
 | |
| Datum
 | |
| gbtreekey_in(PG_FUNCTION_ARGS)
 | |
| {
 | |
| 	Oid			typioparam = PG_GETARG_OID(1);
 | |
| 
 | |
| 	ereport(ERROR,
 | |
| 			(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
 | |
| 			 errmsg("cannot accept a value of type %s",
 | |
| 					format_type_extended(typioparam, -1,
 | |
| 										 FORMAT_TYPE_ALLOW_INVALID))));
 | |
| 
 | |
| 	PG_RETURN_VOID();			/* keep compiler quiet */
 | |
| }
 | |
| 
 | |
| Datum
 | |
| gbtreekey_out(PG_FUNCTION_ARGS)
 | |
| {
 | |
| 	/* Sadly, we do not receive any indication of the specific type */
 | |
| 	ereport(ERROR,
 | |
| 			(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
 | |
| 			 errmsg("cannot display a value of type %s", "gbtreekey?")));
 | |
| 
 | |
| 	PG_RETURN_VOID();			/* keep compiler quiet */
 | |
| }
 | |
| 
 | |
| 
 | |
| /*
 | |
| ** GiST DeCompress methods
 | |
| ** do not do anything.
 | |
| */
 | |
| Datum
 | |
| gbt_decompress(PG_FUNCTION_ARGS)
 | |
| {
 | |
| 	PG_RETURN_POINTER(PG_GETARG_POINTER(0));
 | |
| }
 |