In PgSql, columns are printed. Therefore, if you want an operator on them; you need to specify a column.
suppose you have a column of βminutesβ and you want to add β+5β to each value of the column βmintuesβ
Since you are adding an integer value as well, the column of minutes must be an integer, then adding can be done.
therefore, it is not true:
select *, minutes+5 from my table β Syntax error
select *, minutes::int + 5 from mytable enter output
Ankit Vishwakarma
source share