Re: [GENERAL] to_char bug?

2005-03-04 Thread Ben Trewern
Thanks, sometimes the obvious just passes me by. :-( If the number is negative there needs to be room for the minus sign... Martijn van Oosterhout kleptog@svana.org wrote in message news:[EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you

Re: [GENERAL] to_char bug?

2005-03-02 Thread Martijn van Oosterhout
If the number is negative there needs to be room for the minus sign... On Tue, Mar 01, 2005 at 09:25:02AM -, Ben Trewern wrote: From the docs: FM suppresses leading zeroes and trailing blanks that would otherwise be added to make the output of a pattern be fixed-width It works now

Re: [GENERAL] to_char bug?

2005-03-01 Thread Ben Trewern
From the docs: FM suppresses leading zeroes and trailing blanks that would otherwise be added to make the output of a pattern be fixed-width It works now but for one I don't understand why the space is added in the firs place and two I think the docs don't tell the whole story ie leading

[GENERAL] to_char bug?

2005-02-28 Thread Ben Trewern
Is there any reason why : SELECT char_length(to_char(1, '000')); Gives a result char_length - 4 (1 row) It seems that to_char(1, '000') gives a string 001 with a space in front. Is this a bug? Regards, Ben ---(end of

Re: [GENERAL] to_char bug?

2005-02-28 Thread Bricklen Anderson
Ben Trewern wrote: Is there any reason why : SELECT char_length(to_char(1, '000')); Gives a result char_length - 4 (1 row) It seems that to_char(1, '000') gives a string 001 with a space in front. Is this a bug? Regards, Ben Try formatting the result: SELECT

Re: [GENERAL] to_char bug?

2005-02-28 Thread Tom Lane
Ben Trewern [EMAIL PROTECTED] writes: It seems that to_char(1, '000') gives a string 001 with a space in front. Is this a bug? No. Possibly you want 'FM000'. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe