Re: UPPER() Function Not Working as Expected in PostgreSQL 12.5 Version

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: UPPER() Function Not Working as Expected in PostgreSQL 12.5 Version
Дата
Msg-id CAKFQuwb_dLFQ_K6n8RjjV32DmBkad7+RUqLBC1W9ZyHCNHYkAA@mail.gmail.com
обсуждение исходный текст
Ответ на UPPER() Function Not Working as Expected in PostgreSQL 12.5 Version  ("Saraswat, Dhruv" <dhruv.saraswat@thermofisher.com>)
Ответы Re: UPPER() Function Not Working as Expected in PostgreSQL 12.5 Version  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
On Thu, Jul 8, 2021 at 2:26 AM Saraswat, Dhruv <dhruv.saraswat@thermofisher.com> wrote:

Long Version –

We have a table in which 1 of the columns is called ‘name’ with a datatype of ‘name’. This column stores username values, for example ==> dhruv.saraswat@thermofisher.com


I unfortunately don't know the answer to your primary query but you are definitely misusing the "name" datatype.  An email address should be stored using text.  In fact, per the documentation, user schemas should not use the "name" type for any reason.

In furtherance of diagnosing the observed problem, though, showing the explain analyze plans from the two systems would be helpful - mostly in trying to figure out whether indexes use is a differentiating factor.  Being able to get rid of the table altogether would be a nice bonus - construct cases with working and non-working values (lower and upper results) looking for observed differences.

In short, though, while their may be a bug here, and we'd like to know, the suggested course of action for you is to fix your schema to use the documented text data type and get rid of the effectively undocumented "name".

David J.

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Saraswat, Dhruv"
Дата:
Сообщение: UPPER() Function Not Working as Expected in PostgreSQL 12.5 Version
Следующее
От: Tom Lane
Дата:
Сообщение: Re: UPPER() Function Not Working as Expected in PostgreSQL 12.5 Version