I execute the usual select name from table in postgresql and get a column of string values ​​in the form:

 ааа ббб ггг 

Is it possible to somehow change the query so that each value in the column is displayed wrapped in quotes (preferably single), like this:

 'aaa' 'ббб' 'ггг' 

    1 answer 1

    Required through the concatenation || add 'wrapping' in '

     select '''' || name || '''' as name from table