Can column name be "Group" in PostgreSQL or in any databases
group is a reserved word (and by is another reserved word) - it's not GROUP BY that is reserved. Because it is a reserved word, it cannot be used directly as an identifier.
To use a reserved word or a name with &quot;illegal&quot; characters (such as a space) for an identifier, you need to quote the identifier.
ALTER TABLE test RENAME COLUMN sum TO &quot;group&quot;;

Note that when using quoted identifiers, you need to always quote it. And it becomes case sensitive. &quot;group&quot; is a different column name than &quot;GROUP&quot;.
For more details please see the manual.
In general it is a very bad idea to use names that require quoting. It will save you a lot of trouble if you can come up with a different name that does not require quoting.