Merge 2 columns from joined table lets say I have 2 tables :

group
{
     id,
     export boolean not null default false
}


and

channel
{
     id,
     group_id null,
     export boolean null
}


Is it possible, with 1 query, to request the export boolean value for a specified channel id such as :


channel.export is not null return it as is
if channel.export is null and channel.group_id is null return false
if channel.export is null and channel.group_d is not null return group.export


I am using postgresql 10.

This seems a little bit hard.
You requirement can be translated into a CASE statement expression almost word for word.

SELECT 
CASE 
    WHEN channel.export is not null then channel.export 
    WHEN channel.group_id is null then false
    ELSE "group".export
END as merged_bool
FROM channel LEFT JOIN "group" ON (group_id="group".id);