Re: What is the best way to force character data to upper case

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: What is the best way to force character data to upper case
Дата
Msg-id 4F2BDA20.4000501@iol.ie
обсуждение исходный текст
Ответ на What is the best way to force character data to upper case  ("Dennis" <dennis@kabonkulator.com>)
Список pgsql-general
On 02/02/2012 06:09, Dennis wrote:
> I am wondering what the best way is to force character data to a
> specific case, like upper case for example.   Is a trigger or rule the
> only option?  Would a check constraint be better or faster than using
> rules or triggers, knowing that a check constraint puts the onus back on
> the client code to ensure the data is in the correct case?

Use the upper() function.

http://www.postgresql.org/docs/9.1/static/functions-string.html

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

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

Предыдущее
От: Chris Travers
Дата:
Сообщение: Re: What is the best way to force character data to upper case
Следующее
От: Jay Levitt
Дата:
Сообщение: Re: Extensions btree_gist and cube collide?