Re: Adding columns to a view

From: merlyn(at)stonehenge(dot)com (Randal L(dot) Schwartz)
To: Ingo van Lil <inguin(at)gmx(dot)de>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Adding columns to a view
Date: 2005-12-28 17:44:48
Message-ID: 86u0ctt8tr.fsf@blue.stonehenge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "Ingo" == Ingo van Lil <inguin(at)gmx(dot)de> writes:

Ingo> Well, in my case the situation is further complicated by the fact that
Ingo> adding a column to the view should be done automatically from a trigger
Ingo> function. I wanted some kind of matrix view that had a column for every
Ingo> row in a certain table. And whenever a new line was inserted into that
Ingo> table the view should automatically be extended by one column.

This seems wrong, with the same spidey sense tingling that triggered (ugh :)
yesterday when I said "sending mail from the database is wrong".

Your tables shouldn't change during the execution of your application.
If they must, you are probably pushing things that belong "above SQL"
(like middleware) and forcing SQL to do them, with all the appropriate
trouble that results from that.

In general, if it looks difficult to do with PostgreSQL, you're
probably heading the wrong direction for good database design.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn(at)stonehenge(dot)com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2005-12-28 17:45:41 Re: sending mail from Postgres
Previous Message Jim C. Nasby 2005-12-28 17:33:02 Re: POSTGRES DB 3 800 000 rows table, speed up?