Hi,
I have defined some function and also used NDBOX structure that having
variable length.

typedef struct NDBOX
{
    int32        vl_len_;        /* varlena length */
    unsigned int dim;
    double        x[1];
} NDBOX;

When i called my function, it gives NDBOX to be null
On debugging, i found out ,FunctionInvokeCall invokes fmgr_oldstyle
function, for getting argument

if (fnextra->arg_toastable[i])    //this returns false, not able to get
arguments
            fcinfo->arg[i] =
PointerGetDatum(PG_DETOAST_DATUM(fcinfo->arg[i]));
    }

"How to get arguments toastable??" and even my table pg_class.reltoastrelid
entry is zero.
Can i have to tell explicitly to toast?

If i commented that if conditions then, it got stuck below:

struct varlena *
pg_detoast_datum(struct varlena * datum)
{
    if (VARATT_IS_EXTENDED(datum))      //My code get stuck here
        return heap_tuple_untoast_attr(datum);
    else
        return datum;
}

Can anyone tell me what VARATT_IS_EXTENDED(datum) mean?

Thanks

Reply via email to