Re: trigger or something else? - Mailing list pgsql-sql

From Karel Zak
Subject Re: trigger or something else?
Date
Msg-id Pine.LNX.3.96.1000628124410.22962F-100000@ara.zf.jcu.cz
Whole thread Raw
In response to trigger or something else?  ("Emils Klotins" <emils@dot.lv>)
List 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 by date:

Previous
From: "Emils Klotins"
Date:
Subject: trigger or something else?
Next
From: Guillaume Perréal
Date:
Subject: Re: extract last months data