Search Postgresql Archives

Re: immutable functions and enumerate type casts in indexes

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

 



Edoardo Panfili <edoardo@xxxxxxxx> writes:
> 	labelDatum = DirectFunctionCall1(enum_out,datumIbrido);
> 	label = (char *) DatumGetPointer(labelDatum);

Just FYI, preferred style for the second line would be

	label = DatumGetCString(labelDatum);

Nearly all standard data types have DatumGetFoo and FooGetDatum
macros to hide the conversion details (even if it's only a cast).

			regards, tom lane


[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