RE: Pgsql error in coalesce - Mailing list pgsql-novice

From David Raymond
Subject RE: Pgsql error in coalesce
Date
Msg-id AM0PR07MB4036F9D49A4B59C955B79F6587720@AM0PR07MB4036.eurprd07.prod.outlook.com
Whole thread Raw
In response to Pgsql error in coalesce  (Chamath Sajeewa <csgsajeewa@gmail.com>)
List 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 by date:

Previous
From: Chamath Sajeewa
Date:
Subject: Re: [EXTERNAL] Pgsql error in coalesce
Next
From: Alvaro Herrera
Date:
Subject: Re: Pgsql error in coalesce