| От | Jurgen Defurne |
|---|---|
| Тема | Re: Auto-uppercase inserted column |
| Дата | |
| Msg-id | 39262911.BC2D9710@glo.be обсуждение |
| Ответ на | Auto-uppercase inserted column (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Ответы |
Re: Auto-uppercase inserted column
|
| Список | pgsql-general |
Bruce Momjian wrote: > Is there a way to automatically uppercase a column upon insert or > update? > > I don't think rules can do that because of the problem of recursion. > The only way I think it can be done is using triggers. Is that correct? > Since triggers are available in postgreSQL, that should be the way, yes. You have to have access to the NEW values in your trigger, and then you should say something like NEW.field := upper(NEW.field) ; In older database systems this would be done in the entry system, but then you have a coupling between your application and the database. Good luck. Jurgen Defurne defurnj@glo.be
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера