Finally could make it using
regexp_replace (my_field_to_trim, '.+my_triming_string' , '') for the "leading"
case
regexp_replace (my_field_to_trim, 'my_triming_string(.+)' , '') for the
"trailing" case
And both of them in this order a for the "both" one.
I don't know why, but could not use '*?'
On Fri, Aug 9, 2013 at 11:06:15AM -0400, Tom Lane wrote:
> Bruce Momjian 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 argumen
Bruce Momjian 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 SQL-spec syntactic su
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 r
On Fri, Jul 26, 2013 at 02:23:10AM +, am...@amutu.com wrote:
> in the postgresql doc 9.4,I find the trim() function like this:
>
>
> trim([leading | trailing | both] [characters] from string)
>
>
> so the trim should be pass only one argument with some optional prefix ---
> but I
> find th