Re: Pgsql error in coalesce

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Chamath Sajeewa <csgsajeewa(at)gmail(dot)com>
Cc: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: Pgsql error in coalesce
Date: 2020-07-27 17:42:07
Message-ID: 20200727174207.GA26624@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 2020-Jul-27, Chamath Sajeewa wrote:

> 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".

I'd bet you're not querying the table you think you're querying ...
What does "\d table" show? Also, please show the complete query, and
SHOW search_path .

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Chamath Sajeewa 2020-07-27 17:43:55 Re: Pgsql error in coalesce
Previous Message David Raymond 2020-07-27 17:33:09 RE: Pgsql error in coalesce