Re: SELECT query fails after pg_upgrade as the conditional operator fails

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Nithin Johnson <nithin(dot)johnson(at)altair(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>, Suresh Thelkar <suresh(dot)thelkar(at)altair(dot)com>, Subhasis Bhattacharya <subhasis(dot)bhattacharya(at)altair(dot)com>
Subject: Re: SELECT query fails after pg_upgrade as the conditional operator fails
Date: 2019-04-13 19:34:22
Message-ID: CAC+AXB2qE9ZF8MZZ=OSEfg6ufKuGBn-6ZzNwT-iAJhE5UHOh7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>
> The following query fails:
>
> SELECT * from table where jobid = 'foo';
>
>
>
> Whereas the following is passing:
>
> SELECT * from table where jobid LIKE '%foo';
>
> SELECT * from table where trim(jobid) = 'foo';
>
>
>
> We were suspecting some leading invisible characters before 'foo'. but the
> following queries went well:
>
> SELECT left(jobid, 1) from table where jobid LIKE '%foo';
>
> SELECT ascii(jobid) from table where jobid LIKE '%foo';
>

Please post the error code, also the plan for the different queries and the
description of the table.

Can you check if rebuilding the table's indexes solves the issue? If so,
send output of that operation.

Regards,

Juan José Santamaría Flecha

>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message bricklen 2019-04-13 21:47:03 Re: LDAP security connection
Previous Message Nithin Johnson 2019-04-13 07:33:34 SELECT query fails after pg_upgrade as the conditional operator fails