From: | Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | Emils Klotins <emils(at)dot(dot)lv> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: trigger or something else? |
Date: | 2000-06-28 10:52:40 |
Message-ID: | Pine.LNX.3.96.1000628124410.22962F-100000@ara.zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Anatoly K. Lasareff | 2000-06-28 10:57:53 | Re: trigger or something else? |
Previous Message | Emils Klotins | 2000-06-28 10:29:24 | trigger or something else? |