mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Load FK defs into relcache for use by planner
Fastpath ignores this if no triggers defined. Author: Tomas Vondra, with fastpath and comments added by me Reviewers: David Rowley, Simon Riggs
This commit is contained in:
@ -2137,6 +2137,16 @@ _outIndexOptInfo(StringInfo str, const IndexOptInfo *node)
|
||||
/* we don't bother with fields copied from the index AM's API struct */
|
||||
}
|
||||
|
||||
static void
|
||||
_outForeignKeyOptInfo(StringInfo str, const ForeignKeyOptInfo *node)
|
||||
{
|
||||
WRITE_NODE_TYPE("FOREIGNKEYOPTINFO");
|
||||
|
||||
WRITE_OID_FIELD(conrelid);
|
||||
WRITE_OID_FIELD(confrelid);
|
||||
WRITE_INT_FIELD(nkeys);
|
||||
}
|
||||
|
||||
static void
|
||||
_outEquivalenceClass(StringInfo str, const EquivalenceClass *node)
|
||||
{
|
||||
@ -3607,6 +3617,9 @@ _outNode(StringInfo str, const void *obj)
|
||||
case T_IndexOptInfo:
|
||||
_outIndexOptInfo(str, obj);
|
||||
break;
|
||||
case T_ForeignKeyOptInfo:
|
||||
_outForeignKeyOptInfo(str, obj);
|
||||
break;
|
||||
case T_EquivalenceClass:
|
||||
_outEquivalenceClass(str, obj);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user