Re: PG SQL and LIKE clause

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Matthias Apitz <guru(at)unixarea(dot)de>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: PG SQL and LIKE clause
Date: 2019-09-13 05:33:10
Message-ID: CAFj8pRAeL8CyY9bsjVL=4yw5mUAtDkJu6NdTdVSMXQxEsdqspg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

pá 13. 9. 2019 v 7:29 odesílatel Matthias Apitz <guru(at)unixarea(dot)de> napsal:

>
> Hello,
>
> We're porting a huge Library Management System, written using all kind
> of languages one can think of (C, C++, ESQL/C, Perl, Java, ...) on Linux
> from the DBS Sybase to PG, millions of lines of code, which works also
> with DBS Oracle and in the past with INFORMIX-SE and -ONLINE.
>
> We got to know that in CHAR columns with trailing blanks a
>
> SELECT ... FROM ... WHERE name LIKE 'Ali'
>
> does not match in 'name' having 'Ali '.
>
> I glanced through our code with grep pipelines and found some hundred
> places which would be affected by this problem. I'm not interested in a
> religious discussion if or if not this behaviour of PG is correcter or
> better than in Sybase. It's just different to Sybase.
>
> Any hints to address this problem? Or is there any compile time option
> for the PG server to address this?
>

There is not simple solution - you should to write own patch and used
patched postgres.

Pavel

> Thanks
>
> matthias
> --
> Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/
> +49-176-38902045
> Public GnuPG key: http://www.unixarea.de/key.pub
>
> Mientras haya voluntad de lucha habrá esperanza de vencer.
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2019-09-13 06:11:56 Re: PG SQL and LIKE clause
Previous Message Matthias Apitz 2019-09-13 05:28:46 PG SQL and LIKE clause