From: | Nick Raj <nickrajjain(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | DETOAST Datum |
Date: | 2011-05-16 07:41:06 |
Message-ID: | BANLkTik_s50hVBERYFZb+8rSQdYUEDQRsQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2011-05-16 07:59:58 | Extensions in schemas |
Previous Message | Magnus Hagander | 2011-05-16 07:35:13 | Re: adding a new column in IDENTIFY_SYSTEM |