Re: Understanding Datum
От | Nick Raj |
---|---|
Тема | Re: Understanding Datum |
Дата | |
Msg-id | AANLkTinTBMnBP7Owy=ZBB8aQo+TBSS+YOtjCus6pmP4y@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Understanding Datum (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Understanding Datum
Re: Understanding Datum |
Список | pgsql-general |
If Datum contains only the value (not having type specific info.), then
Suppose i want to print the Datum V value (already defined in postgres)
then printf("%??", V);
Because V is assigned by PG_GETARG_POINTER(1);
I don't having the information of type Datum.
How to print the value of Datum in postgres?
Suppose i want to print the Datum V value (already defined in postgres)
then printf("%??", V);
Because V is assigned by PG_GETARG_POINTER(1);
I don't having the information of type Datum.
How to print the value of Datum in postgres?
On Thu, Mar 24, 2011 at 2:35 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Nick Raj <nickrajjain@gmail.com> writes:Datum does not carry any type information, only a value. Functions are
> In postgres, typedef uintptr_t Datum
> Datum is getting value from PG_GETARG_POINTER(1);
> But, now problem is how would i know the type of PG_GETARG_POINTER(1)
> (postgres internally pass this argument) to figure out datum type?
typically coded to know their input types a priori. If you want to
write code that is not type-specific then you'd better be passing around
type OIDs as well as values.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: