Group: pgsql.hackers


Subject: strange tuple from ExecutorRun
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/16/2007 11:22:23 AM
[ not directly related to your bug, but... ] "Pavel Stehule" <pavel.stehule@gmail.com> writes: > result = ExecutorRun(qdesc, ForwardScanDirection, 1L); > tuple = ExecMaterializeSlot(result); > values = (Datum *) palloc(nargs * sizeof(Datum)); > nulls = (char *) palloc(nargs * sizeof(char)); > /* copy typle to current context */ > tuple = heap_copytuple(tuple); > heap_deform_tuple(tuple, qdesc->tupDesc, values, nulls); Surely that's the hard way, considering that the output tupleslot is probably *already* a values/nulls array. Use slot_getattr(), or call slot_getallattrs() and then reference the slot's arrays directly. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings