Re: PG SQL and LIKE clause

2019-09-13 Thread John W Higgins
Is this a possibility? From https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP - ~ 'ali[ ]*$' matches strings ending in ali that have zero of more spaces after ali this would match 'bali' 'ali' 'ali ' 'bali ' If you need full string then it would be like thi

Re: PG SQL and LIKE clause

2019-09-13 Thread Adrian Klaver
On 9/13/19 7:35 AM, Ron wrote: On 9/13/19 9:14 AM, Adrian Klaver wrote: On 9/12/19 11:11 PM, Ron wrote: On 9/13/19 12:28 AM, Matthias Apitz wrote: 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

Re: PG SQL and LIKE clause

2019-09-13 Thread Ron
On 9/13/19 9:14 AM, Adrian Klaver wrote: On 9/12/19 11:11 PM, Ron wrote: On 9/13/19 12:28 AM, Matthias Apitz wrote: 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,

Re: PG SQL and LIKE clause

2019-09-13 Thread Tom Lane
Matthias Apitz writes: > 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'

Re: PG SQL and LIKE clause

2019-09-13 Thread Adrian Klaver
On 9/12/19 11:11 PM, Ron wrote: On 9/13/19 12:28 AM, Matthias Apitz wrote: 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 als

Re: PG SQL and LIKE clause

2019-09-13 Thread Thomas Kellerer
Matthias Apitz schrieb am 13.09.2019 um 07:28: > 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 pa

Re: PG SQL and LIKE clause

2019-09-13 Thread Ron
On 9/13/19 12:28 AM, Matthias Apitz wrote: 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

Re: PG SQL and LIKE clause

2019-09-12 Thread Pavel Stehule
pá 13. 9. 2019 v 8:49 odesílatel Matthias Apitz napsal: > El día Friday, September 13, 2019 a las 07:33:10AM +0200, Pavel Stehule > escribió: > > > > We got to know that in CHAR columns with trailing blanks a > > > > > > SELECT ... FROM ... WHERE name LIKE 'Ali' > > > > > > does not match in 'nam

Re: PG SQL and LIKE clause

2019-09-12 Thread Matthias Apitz
El día Friday, September 13, 2019 a las 07:33:10AM +0200, Pavel Stehule escribió: > > 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

Re: PG SQL and LIKE clause

2019-09-12 Thread Pavel Stehule
Hi pá 13. 9. 2019 v 7:29 odesílatel Matthias Apitz 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 > w

PG SQL and LIKE clause

2019-09-12 Thread Matthias Apitz
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 k