Re: [HACKERS] Help with Array Function in C language...

From: "Cristian Prieto" <cristian(at)clickdiario(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Help with Array Function in C language...
Date: 2005-11-07 23:20:38
Message-ID: 00a801c5e3f1$dea5f9d0$6500a8c0@gt.ClickDiario.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Thanks a lot, but I still getting an error message like this:
ERROR: cache lookup failed for type 0

What is wrong?

-----Original Message-----
From: pgsql-hackers-owner(at)postgresql(dot)org
[mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Lunes, 07 de Noviembre de 2005 05:17 p.m.
To: Cristian Prieto
Cc: pgsql-general(at)postgresql(dot)org; pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Help with Array Function in C language...

"Cristian Prieto" <cristian(at)clickdiario(dot)com> writes:
> Datum
> test_array(PG_FUNCTION_ARGS)
> {
> ArrayType *v = PG_GETARG_ARRAYTYPE_P(1);
> Datum element;
> Oid array_type = get_array_type(v);

I think you want get_element_type, instead. And you definitely ought to
be checking for a failure result (zero).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Assad Jarrahian 2005-11-08 07:31:33 Re: Connect to a database in a .sql file
Previous Message Tom Lane 2005-11-07 23:16:58 Re: [HACKERS] Help with Array Function in C language...

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-11-07 23:28:25 Re: broken comment justification logic in new pgindent
Previous Message Tom Lane 2005-11-07 23:16:58 Re: [HACKERS] Help with Array Function in C language...