| От | Craig Ringer |
|---|---|
| Тема | Re: Can column name aliases be supported? |
| Дата | |
| Msg-id | 50358FAB.8060908@ringerc.id.au обсуждение исходный текст |
| Ответ на | Re: Can column name aliases be supported? (Bosco Rama <postgres@boscorama.com>) |
| Список | pgsql-general |
On 08/23/2012 06:41 AM, Bosco Rama wrote: > Ooops! Hit send too fast... > > On 08/22/12 15:34, Bosco Rama wrote: >> On 08/22/12 15:19, Gauthier, Dave wrote: >>> >>> I know a view can be used to alias one of them. >> >> It can alias all of them: >> >> create view xyz as >> select *, last_name as lname, last_name as surname >> from mytable; >> >> (not the nicest version but functional) > > ... and then use an INSTEAD/ALSO rule to do the update, if needed. ... though if the user UPDATEd more then one of them, who knows what'd happen. I'd either (a) fire the client, or (b) define different views for different clients, with appropriate DO INSTEAD triggers (9.1) or rules (9.0 and below). (a) would be awfully tempting. -- Craig Ringer
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера