Is it possible to rename default
f1, f2, f3... names when using
row_to_json function for only some columns?
I can do
But if I want only names without
id_customer, I have to use
and then I get
And I would like to get this result with either default column names or my own. I know I can create my own composite type and use
but isn't it possible to do it right in the query without creating that type?