BUG #4841: like and trim queries

Lists: pgsql-bugs
From: "jeewan" <ccoew(dot)g1(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4841: like and trim queries
Date: 2009-06-06 06:38:48
Message-ID: 200906060638.n566cmTV018006@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4841
Logged by: jeewan
Email address: ccoew(dot)g1(at)gmail(dot)com
PostgreSQL version: 8.3.6
Operating system: windows/fedora
Description: like and trim queries
Details:

1.Queries having some combination of % and _ in like query does not
work.......
example-

like %_%

2.'trim' is not supported by this version on both the platforms

ERROR: function pg_catalog.rtrim(numeric, integer) does not exist
LINE t: ...ct col2_date,col4_int,colt_timestamp,col5_numeric,trim(trail...
^
HINT: No function matches the given name and argument types.


From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: jeewan <ccoew(dot)g1(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4841: like and trim queries
Date: 2009-06-06 08:02:19
Message-ID: 4A2A228B.7050304@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

jeewan wrote:
> The following bug has been logged online:
>
> Bug reference: 4841
> Logged by: jeewan
> Email address: ccoew(dot)g1(at)gmail(dot)com
> PostgreSQL version: 8.3.6
> Operating system: windows/fedora
> Description: like and trim queries
> Details:
>
> 1.Queries having some combination of % and _ in like query does not
> work.......
> example-
>
> like %_%

can you get a bit more specific about that (like with an example query
and schema/data)? We already had a report to that regard before but some
more detail would be good to have. See

http://archives.postgresql.org/pgsql-bugs/2009-05/msg00230.php

for the previous report that got fixed here:

http://archives.postgresql.org/pgsql-committers/2009-05/msg00311.php

so that one will appear in the next pointrelease for 8.3.

>
> 2.'trim' is not supported by this version on both the platforms
>
> ERROR: function pg_catalog.rtrim(numeric, integer) does not exist
> LINE t: ...ct col2_date,col4_int,colt_timestamp,col5_numeric,trim(trail...

this is not a bug - there is no version of of trim() that works on
numeric(and I'm not sure why one would want this). If you really have to
do that operation you need to cast to text first.

Stefan


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: jeewan <ccoew(dot)g1(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4841: like and trim queries
Date: 2009-06-06 15:01:08
Message-ID: 9467.1244300468@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
> jeewan wrote:
>> ERROR: function pg_catalog.rtrim(numeric, integer) does not exist
>> LINE t: ...ct col2_date,col4_int,colt_timestamp,col5_numeric,trim(trail...

> this is not a bug - there is no version of of trim() that works on
> numeric(and I'm not sure why one would want this).

Perhaps he's looking for round()?

regards, tom lane