Re: [BUGS] BUG #8335: trim() un-document behaviour

2013-08-09 Thread Romain Billon-Grand
Running postgres 9.1.4 using pgAdmin3 on a macbook air intel OS 10.6 I just had this bug, using comma: SELECT trim(trailing texte_natif , 'DATEDENAISSANCE' ) FROM CROP returned the whole field, including the string 'DATEDENAISSANCE', but except the very first character, the column being called

Re: [BUGS] BUG #8335: trim() un-document behaviour

2013-08-09 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: The attached patch swaps the arguments in the parser, and allows your expected behavior: This patch is completely unsafe. It will break stored rules, which may contain calls using the existing argument order (which will be dumped without any of the

Re: [BUGS] BUG #8335: trim() un-document behaviour

2013-08-09 Thread Bruce Momjian
On Fri, Aug 9, 2013 at 11:06:15AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: The attached patch swaps the arguments in the parser, and allows your expected behavior: This patch is completely unsafe. It will break stored rules, which may contain calls using the