Re: Need help with a function boolean --> text or array - Mailing list pgsql-novice

From Vyacheslav Kalinin
Subject Re: Need help with a function boolean --> text or array
Date
Msg-id 9b1af80e0801222109s596c5c4em7587da71c417dc6@mail.gmail.com
Whole thread Raw
In response to Re: Need help with a function boolean --> text or array  ("Vyacheslav Kalinin" <vka@mgcp.com>)
List pgsql-novice
Patch:
  select id, name, rtrim(leading ' ,' from
                          (case when has_olive then 'Olive' else '' end) ||
                          (case when has_cheese then ', Cheese' else '' end) ||
                          (case when has_onion then ', Onion' else '' end) ||
                          (case when has_salami then ', Salami' else '' end) ||
                          (case when has_egg then ', Egg' else '' end) ||
                          (case when has_extra_hot_chilies then ', Extra hot chilies' else '' end)) as addons
    from pizzas;

Doesn't look too fancy though...

pgsql-novice by date:

Previous
From: "Vyacheslav Kalinin"
Date:
Subject: Re: Need help with a function boolean --> text or array
Next
From: Raimon Fernandez
Date:
Subject: using column alias to make operations