Re: Is there a way to replace select * fields in result ?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Is there a way to replace select * fields in result ?
Дата
Msg-id CAKFQuwY1jJjGy+YrDzisu2Z8GRTkKiVKPC339f93UkPM++EbAQ@mail.gmail.com
обсуждение исходный текст
Ответ на Is there a way to replace select * fields in result ?  (Condor <condor@stz-bg.com>)
Ответы Re: Is there a way to replace select * fields in result ?  (Condor <condor@stz-bg.com>)
Список pgsql-general

On Saturday, June 12, 2021, Condor <condor@stz-bg.com> wrote:

Hello,

Is there a way to replace select * fileds in result ?
I have select qw.* from table but I want field for example mm to be replaced with custom value like:

select qw.*, case whem length(qw.mm) > 0 THEN COALESCE(SUBSTRING(qw.mm, 1, 1), '') ELSE qw.mm END AS qw.mm

Is there some way to do that ?


No.  If you don’t want a column from “*” to appear in the output you cannot use “*”.  In general, for production, you should avoid “*” anyway.

David J.

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

Предыдущее
От: Condor
Дата:
Сообщение: Is there a way to replace select * fields in result ?
Следующее
От: Condor
Дата:
Сообщение: Re: Is there a way to replace select * fields in result ?