Re: [GENERAL] formatting the output of a function

2007-06-07 Thread Richard Huxton
Islam Hegazy wrote: Hi all I created a function that returns a set of records. This function returns an integer and a float as the record fields. I have a problem in this function, it truncates the output. e.g. 1342 is displayed as 134, 456.46 is displayed as 456. In other words, it displays

Re: [GENERAL] formatting the output of a function

2007-06-06 Thread Martijn van Oosterhout
On Wed, Jun 06, 2007 at 01:45:43PM -0600, Islam Hegazy wrote: > output[0] = (char*)palloc(sizeof(int)); //allocate space for a string that > accepts an integer No it doesn't, it allocates space for an integer > output[1] = (char*)palloc(sizeof(double)); //allocate space for a string that > acce

[GENERAL] formatting the output of a function

2007-06-06 Thread Islam Hegazy
Hi all I created a function that returns a set of records. This function returns an integer and a float as the record fields. I have a problem in this function, it truncates the output. e.g. 1342 is displayed as 134, 456.46 is displayed as 456. In other words, it displays the first 3 digits onl