From: | David Raymond <David(dot)Raymond(at)tomtom(dot)com> |
---|---|
To: | "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Pgsql error in coalesce |
Date: | 2020-07-27 17:33:09 |
Message-ID: | AM0PR07MB4036F9D49A4B59C955B79F6587720@AM0PR07MB4036.eurprd07.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmail(dot)com>
Sent: Monday, July 27, 2020 12:51 PM
To: pgsql-novice(at)lists(dot)postgresql(dot)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!!
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-07-27 17:42:07 | Re: Pgsql error in coalesce |
Previous Message | Chamath Sajeewa | 2020-07-27 17:32:42 | Re: [EXTERNAL] Pgsql error in coalesce |