From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: PG SQL and LIKE clause
Date: Fri, 13 Sep 2019 09:16:10 +0200
Message-ID: <48e3d88a-3d17-4704-b515-c748e2cebc0a@gmx.net> (raw)
In-Reply-To: <20190913052846.GA3070@c720-r342378>
References: <20190913052846.GA3070@c720-r342378>
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 past with INFORMIX-SE and -ONLINE.
>
> We got to know that in CHAR columns with trailing blanks a
In a nutshell: do not use the CHAR data type (neither in Oracle nor in Postgres)
Unless your application actively checks the data type name of columns in a table you can simply change the type of those columns to varchar (or text) and get rid of the annoying (but required) behaviour of the CHAR type.
To be honest, I am surprised this didn't show up in Oracle, as I think the CHAR behaviour there is the same as in Postgres.
Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: PG SQL and LIKE clause
In-Reply-To: <48e3d88a-3d17-4704-b515-c748e2cebc0a@gmx.net>
References: <20190913052846.GA3070@c720-r342378> <48e3d88a-3d17-4704-b515-c748e2cebc0a@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox