RE: Pgsql error in coalesce

Поиск
Список
Период
Сортировка
От David Raymond
Тема RE: Pgsql error in coalesce
Дата
Msg-id AM0PR07MB4036F9D49A4B59C955B79F6587720@AM0PR07MB4036.eurprd07.prod.outlook.com
обсуждение исходный текст
Ответ на Pgsql error in coalesce  (Chamath Sajeewa <csgsajeewa@gmail.com>)
Список pgsql-novice

Something's definitely weird here.

 

You're sure it's an int4 column?

 

Are you using an unqualified table name in the FROM clause which your search_path might be re-directing to a different table with the same name in a different schema where column_name is text? Or to a temp table with the same name which would be first in the search path?

 

You didn't accidentally put single quotes instead of double quotes around column_name?

 

Trying to think of any other little oopsies that might be in play here.

 

 

From: Chamath Sajeewa <csgsajeewa@gmail.com>
Sent: Monday, July 27, 2020 12:51 PM
To: pgsql-novice@lists.postgresql.org
Subject: Pgsql error in coalesce

 

Hi,

There is table with int4 column. When select query is executed as "select coalesce(column_name, 255), query is failing with below error.

"COALESCE types text and integer cannot be mached".

Any idea?

Thank You!!

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

Предыдущее
От: Chamath Sajeewa
Дата:
Сообщение: Re: [EXTERNAL] Pgsql error in coalesce
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Pgsql error in coalesce