Re: trigger or something else?

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: trigger or something else?
Дата
Msg-id Pine.LNX.3.96.1000628124410.22962F-100000@ara.zf.jcu.cz
обсуждение исходный текст
Ответ на trigger or something else?  ("Emils Klotins" <emils@dot.lv>)
Список pgsql-sql
On Wed, 28 Jun 2000, Emils Klotins wrote:

> Hello,
> 
> I have a table that has to have several fields with different names, 
> but equal content. Sounds stupid, but it is because I have 2 
> different programs querying the same table for user information and 
> each of them uses differently named fields.
Why you not use any VIEW, for example:

CREATE TABLE xxx (a text);
CREATE VIEW v_xxx AS select a as field1, a as field2 from xxx;

test=> INSERT INTO xxx VALUES ('qqqqq');
INSERT 380446 1
test=> SELECT * FROM v_xxx;field1 | field2
--------+--------qqqqq  | qqqqq
(1 row)
                Karel



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

Предыдущее
От: "Emils Klotins"
Дата:
Сообщение: trigger or something else?
Следующее
От: Guillaume Perréal
Дата:
Сообщение: Re: extract last months data