@ -2155,12 +2155,12 @@ RI_FKey_setdefault_del(PG_FUNCTION_ARGS)
elog ( ERROR , " SPI_connect failed " ) ;
elog ( ERROR , " SPI_connect failed " ) ;
/*
/*
* Prepare a plan for the set default delete operation .
* Fetch or prepare a saved plan for the set default delete
* Unfortunately we need to do it on every invocation because the
* operation
* default value could potentially change between calls .
*/
*/
ri_BuildQueryKey ( & qkey , & riinfo , RI_PLAN_SETDEFAULT_DEL_DOUPDATE ) ;
ri_BuildQueryKey ( & qkey , & riinfo , RI_PLAN_SETDEFAULT_DEL_DOUPDATE ) ;
if ( ( qplan = ri_FetchPreparedPlan ( & qkey ) ) = = NULL )
{
{
StringInfoData querybuf ;
StringInfoData querybuf ;
StringInfoData qualbuf ;
StringInfoData qualbuf ;
@ -2207,9 +2207,9 @@ RI_FKey_setdefault_del(PG_FUNCTION_ARGS)
}
}
appendStringInfoString ( & querybuf , qualbuf . data ) ;
appendStringInfoString ( & querybuf , qualbuf . data ) ;
/* Prepare the pl an, don't save i t */
/* Prepare and save the plan */
qplan = ri_PlanCheck ( querybuf . data , riinfo . nkeys , queryoids ,
qplan = ri_PlanCheck ( querybuf . data , riinfo . nkeys , queryoids ,
& qkey , fk_rel , pk_rel , fals e) ;
& qkey , fk_rel , pk_rel , tru e) ;
}
}
/*
/*
@ -2239,7 +2239,7 @@ RI_FKey_setdefault_del(PG_FUNCTION_ARGS)
return PointerGetDatum ( NULL ) ;
return PointerGetDatum ( NULL ) ;
/*
/*
* Handle MATCH PARTIAL set null delete .
* Handle MATCH PARTIAL set default delete .
*/
*/
case FKCONSTR_MATCH_PARTIAL :
case FKCONSTR_MATCH_PARTIAL :
ereport ( ERROR ,
ereport ( ERROR ,
@ -2348,12 +2348,12 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS)
elog ( ERROR , " SPI_connect failed " ) ;
elog ( ERROR , " SPI_connect failed " ) ;
/*
/*
* Prepare a plan for the set default delete operation .
* Fetch or prepare a saved plan for the set default update
* Unfortunately we need to do it on every invocation because the
* operation
* default value could potentially change between calls .
*/
*/
ri_BuildQueryKey ( & qkey , & riinfo , RI_PLAN_SETDEFAULT_UPD_DOUPDATE ) ;
ri_BuildQueryKey ( & qkey , & riinfo , RI_PLAN_SETDEFAULT_UPD_DOUPDATE ) ;
if ( ( qplan = ri_FetchPreparedPlan ( & qkey ) ) = = NULL )
{
{
StringInfoData querybuf ;
StringInfoData querybuf ;
StringInfoData qualbuf ;
StringInfoData qualbuf ;
@ -2400,9 +2400,9 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS)
}
}
appendStringInfoString ( & querybuf , qualbuf . data ) ;
appendStringInfoString ( & querybuf , qualbuf . data ) ;
/* Prepare the pl an, don't save i t */
/* Prepare and save the plan */
qplan = ri_PlanCheck ( querybuf . data , riinfo . nkeys , queryoids ,
qplan = ri_PlanCheck ( querybuf . data , riinfo . nkeys , queryoids ,
& qkey , fk_rel , pk_rel , fals e) ;
& qkey , fk_rel , pk_rel , tru e) ;
}
}
/*
/*
@ -2432,7 +2432,7 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS)
return PointerGetDatum ( NULL ) ;
return PointerGetDatum ( NULL ) ;
/*
/*
* Handle MATCH PARTIAL set null dele te.
* Handle MATCH PARTIAL set default upda te.
*/
*/
case FKCONSTR_MATCH_PARTIAL :
case FKCONSTR_MATCH_PARTIAL :
ereport ( ERROR ,
ereport ( ERROR ,