Esempio n. 1
0
/*
 * ExecCQMatViewUpdate
 *
 * Update an existing row of a CV materialization table.
 */
void
ExecCQMatRelUpdate(ResultRelInfo *ri, TupleTableSlot *slot, EState *estate)
{
	HeapTuple tup = ExecMaterializeSlot(slot);

	simple_heap_update(ri->ri_RelationDesc, &tup->t_self, tup);
	ExecInsertCQMatRelIndexTuples(ri, slot, estate);
}
Esempio n. 2
0
/*
 * ExecCQMatViewInsert
 *
 * Insert a new row into a CV materialization table
 */
void
ExecCQMatRelInsert(ResultRelInfo *ri, TupleTableSlot *slot, EState *estate)
{
	HeapTuple tup = ExecMaterializeSlot(slot);

	heap_insert(ri->ri_RelationDesc, tup, GetCurrentCommandId(true), 0, NULL);
	ExecInsertCQMatRelIndexTuples(ri, slot, estate);
}
Esempio n. 3
0
/*
 * ExecCQMatViewUpdate
 *
 * Update an existing row of a CV materialization table.
 */
bool
ExecCQMatRelUpdate(ResultRelInfo *ri, TupleTableSlot *slot, EState *estate)
{
	HeapTuple tup = ExecMaterializeSlot(slot);
	bool updated = matrel_heap_update(ri->ri_RelationDesc, &tup->t_self, tup);
	if (!HeapTupleIsHeapOnly(tup))
		ExecInsertCQMatRelIndexTuples(ri, slot, estate);
	return updated;
}