mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums. This commit does not in itself do much for us, except eliminate the horrid memory leak associated with evaluation of whole-row variables. However, it lays the groundwork for allowing composite types as table columns, and perhaps some other useful features as well. Per my proposal of a few days ago.
This commit is contained in:
@ -22,7 +22,7 @@ float8 *add_one_float8(float8 *arg);
|
||||
Point *makepoint(Point *pointx, Point *pointy);
|
||||
text *copytext(text *t);
|
||||
text *concat_text(text *arg1, text *arg2);
|
||||
bool c_overpaid(TupleTableSlot *t, /* the current instance of EMP */
|
||||
bool c_overpaid(HeapTupleHeader t, /* the current instance of EMP */
|
||||
int32 limit);
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ concat_text(text *arg1, text *arg2)
|
||||
/* Composite types */
|
||||
|
||||
bool
|
||||
c_overpaid(TupleTableSlot *t, /* the current instance of EMP */
|
||||
c_overpaid(HeapTupleHeader t, /* the current instance of EMP */
|
||||
int32 limit)
|
||||
{
|
||||
bool isnull;
|
||||
|
@ -115,7 +115,7 @@ PG_FUNCTION_INFO_V1(c_overpaid);
|
||||
Datum
|
||||
c_overpaid(PG_FUNCTION_ARGS)
|
||||
{
|
||||
TupleTableSlot *t = (TupleTableSlot *) PG_GETARG_POINTER(0);
|
||||
HeapTupleHeader t = PG_GETARG_HEAPTUPLEHEADER(0);
|
||||
int32 limit = PG_GETARG_INT32(1);
|
||||
bool isnull;
|
||||
int32 salary;
|
||||
|
Reference in New Issue
Block a user