Re: Postgres View DDL

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Postgres View DDL
Дата
Msg-id CAKFQuwYzdVQ2pdnjD7w2HqTUR8h-Dm6L_J8YXjzYLiu9Cknt0Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgres View DDL  (Sam Stearns <sam.stearns@dat.com>)
Список pgsql-sql
On Wednesday, October 16, 2024, Sam Stearns <sam.stearns@dat.com> wrote:
Tried changing to this:
    (coalesce(REGEXP_REPLACE(broker_mc::numeric, '[^0-9]+', '', 'g'), 0)),

Both parts of the coalesce need to be integer.  Therefore:

regexp_replace(…)::integer

In short, the output of the text manipulation better be something that can be cast to integer if you want coalesce to produce an integer.

David J.
 

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