Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Cristian Prieto" <cristian@xxxxxxxxxxxxxxx> 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 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux