Re: Uppercase to lowercase trigger?

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: Uppercase to lowercase trigger?
Дата
Msg-id CAPTjJmqvsdMuaWnkbL5QtOofBfPY_tMSGcU2LKfmcvioXw_XyQ@mail.gmail.com
обсуждение исходный текст
Ответ на Uppercase to lowercase trigger?  (Chrishelring <christianhelring@gmail.com>)
Ответы Re: Uppercase to lowercase trigger?  (Chrishelring <christianhelring@gmail.com>)
Список pgsql-general
On Wed, May 2, 2012 at 10:33 PM, Chrishelring
<christianhelring@gmail.com> wrote:
> Hi,
>
> I´ve got some tables with column names in lowercase. Before updatering these
> tables I want to add a trigger that can convert these lowercase to
> uppercase, and when the tables are updates convert them back to lowercase..

Not entirely sure what you're looking for here, but in Postgres, if
you don't quote your column names, they are lowercased by default.

UPDATE some_table SET ColumnName = 'foo', COLUMNNAME2 = 'bar';

This will work if the table has "columnname" and "columnname2".

ChrisA

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

Предыдущее
От: leaf_yxj
Дата:
Сообщение: How to insert random character data into tables for testing purpose. THanks.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Removal of BSDi, BSD/OS port