mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Add btree_gist support for enum types.
This will allow enums to be used in exclusion constraints. The code uses the new CallerFInfoFunctionCall infrastructure in fmgr, and the support for it added to btree_gist in commit 393bb504d7. Reviewed by Tom Lane and Anastasia Lubennikova Discussion: http://postgr.es/m/56EA8A71.8060107@dunslane.net
This commit is contained in:
@ -48,6 +48,7 @@ gbt_num_compress(GISTENTRY *entry, const gbtree_ninfo *tinfo)
|
||||
leaf = &v.i8;
|
||||
break;
|
||||
case gbt_t_oid:
|
||||
case gbt_t_enum:
|
||||
v.i4 = DatumGetObjectId(entry->key);
|
||||
leaf = &v.i4;
|
||||
break;
|
||||
@ -122,6 +123,7 @@ gbt_num_fetch(GISTENTRY *entry, const gbtree_ninfo *tinfo)
|
||||
datum = Int64GetDatum(*(int64 *) entry->key);
|
||||
break;
|
||||
case gbt_t_oid:
|
||||
case gbt_t_enum:
|
||||
datum = ObjectIdGetDatum(*(Oid *) entry->key);
|
||||
break;
|
||||
case gbt_t_float4:
|
||||
|
Reference in New Issue
Block a user