mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Revert temporal primary keys and foreign keys
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 function46a0cd4cef
Add temporal PRIMARY KEY and UNIQUE constraints86232a49a4
Fix comment on gist_stratnum_btree030e10ff1a
Rename pg_constraint.conwithoutoverlaps to conperioda88c800deb
Use daterange and YMD in without_overlaps tests instead of tsrange.5577a71fb0
Use half-open interval notation in without_overlaps tests34768ee361
Add temporal FOREIGN KEY contraints482e108cd3
Add test for REPLICA IDENTITY with a temporal keyc3db1f30cb
doc: clarify PERIOD and WITHOUT OVERLAPS in CREATE TABLE144c2ce0cc
Fix ON CONFLICT DO NOTHING/UPDATE for temporal indexes Discussion: https://www.postgresql.org/message-id/d0b64a7a-dfe4-4b84-a906-c7dedfa40a3e@eisentraut.org
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/stratnum.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
PG_MODULE_MAGIC;
|
||||
@ -11,7 +10,6 @@ PG_MODULE_MAGIC;
|
||||
PG_FUNCTION_INFO_V1(gbt_decompress);
|
||||
PG_FUNCTION_INFO_V1(gbtreekey_in);
|
||||
PG_FUNCTION_INFO_V1(gbtreekey_out);
|
||||
PG_FUNCTION_INFO_V1(gist_stratnum_btree);
|
||||
|
||||
/**************************************************
|
||||
* In/Out for keys
|
||||
@ -53,28 +51,3 @@ gbt_decompress(PG_FUNCTION_ARGS)
|
||||
{
|
||||
PG_RETURN_POINTER(PG_GETARG_POINTER(0));
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the btree number for supported operators, otherwise invalid.
|
||||
*/
|
||||
Datum
|
||||
gist_stratnum_btree(PG_FUNCTION_ARGS)
|
||||
{
|
||||
StrategyNumber strat = PG_GETARG_UINT16(0);
|
||||
|
||||
switch (strat)
|
||||
{
|
||||
case RTEqualStrategyNumber:
|
||||
PG_RETURN_UINT16(BTEqualStrategyNumber);
|
||||
case RTLessStrategyNumber:
|
||||
PG_RETURN_UINT16(BTLessStrategyNumber);
|
||||
case RTLessEqualStrategyNumber:
|
||||
PG_RETURN_UINT16(BTLessEqualStrategyNumber);
|
||||
case RTGreaterStrategyNumber:
|
||||
PG_RETURN_UINT16(BTGreaterStrategyNumber);
|
||||
case RTGreaterEqualStrategyNumber:
|
||||
PG_RETURN_UINT16(BTGreaterEqualStrategyNumber);
|
||||
default:
|
||||
PG_RETURN_UINT16(InvalidStrategy);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user