postgres icon indicating copy to clipboard operation
postgres copied to clipboard

dynamic column selection with column naming alias is not working

Open benjamin79 opened this issue 2 years ago • 0 comments

Hi,

i have an array (columnsToSelect) of columns to which i want add another one

columnsToSelect.push("(firstname || ' ' || lastname) as fullname");

SELECT ${sql(columnsToSelect)} FROM ${sql(table)}

I tried different combinations with " and ' but without success.

error: missing FROM-clause entry for table

Is this possible?

thanks

benjamin79 avatar Apr 18 '24 13:04 benjamin79