Changing column names in tables

Поиск
Список
Период
Сортировка
От Tony Cade
Тема Changing column names in tables
Дата
Msg-id ed13db1b0803051128l260c8478x49842a19e9b1543@mail.gmail.com
обсуждение исходный текст
Ответы Re: Changing column names in tables  ("Hoover, Jeffrey" <jhoover@jcvi.org>)
Список pgsql-general

I have an Access database that I have exported to PostgreSQL via ODBC, which has worked ok & the data is in PostgreSQL but some of the column names were in mixed case e.g. AccountCode

When I look at the table definitions in pgadmin these are shown in quotes e.g."AccountCode" and any queries made that reference these columns require the quotes.

There are too many fields to issue alter table commands to rename in SQL so my question is , is it safe to use a query such as

    select relfilenode from pg_class where relname='rates'

update  pg_attribute set attname=lower(attname) where attnum >0 and attrelid=23424

В списке pgsql-general по дате отправления:

Предыдущее
От: "Tony Cade"
Дата:
Сообщение: Changing column names in tables 2
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Changing column names in tables 2