Re: Is there a way to replace select * fields in result ? - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Is there a way to replace select * fields in result ?
Date
Msg-id 09C5EA9B-5BC3-441E-B4BC-484393085DB5@gmail.com
Whole thread Raw
In response to Is there a way to replace select * fields in result ?  (Condor <condor@stz-bg.com>)
List pgsql-general

> On 12 Jun 2021, at 10:00, Condor <condor@stz-bg.com> wrote:
>
> select qw.*, case whem length(qw.mm) > 0 THEN COALESCE(SUBSTRING(qw.mm, 1, 1), '') ELSE qw.mm END AS qw.mm

A little off-topic, but isn’t that a roundabout way of writing just this?:

    select qw.*, coalesce(substring(qw.mm, 1, 1), '') as mm

Or even:

    select qw.*, coalesce(left(qw.mm, 1), '') as mm


Regards,

Alban Hertroys
--
There is always an exception to always.







pgsql-general by date:

Previous
From: Condor
Date:
Subject: Re: Is there a way to replace select * fields in result ?
Next
From: Shubham Mittal
Date:
Subject: How to generate file from postgres data