Thanks so much. I had to add the database user and database name:
psql -U XXX -c "select 'alter table '||table_schema||'.'||table_name||' rename column $OLDCOLUMN to $NEWCOLUMN;' from information_schema.tables where table_schema='gis';" my_database | psql -U XXX my_database
and still run in an error. But it renamed quite a bunch of the tables. So, very good!
Stef