Search Postgresql Archives

Re: PG_RETURN_?

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

 



Don Y wrote:
Hi,

I have a set of functions for a data type that return
small integers (i.e. [0..12]).  I can, of course, represent
it as a char, short or long (CHAR, INT16 or INT32).
re there any advantages/drawbacks to chosing one particular
PG_RETURN_ type over another (realizing that they are
effectively just casts)?

If they are integers then an int would be the obvious choice. If you are going to treat them as int2 outside the function then int2, otherwise just integer. Oh, it's int2/int4 not int16/int32.
--
  Richard Huxton
  Archonet Ltd


[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