Triggers to create Tables

From: Martin Möderndorfer <mmoedern(at)linux(dot)stuco(dot)uni-klu(dot)ac(dot)at>
To: pgsql-sql(at)postgresql(dot)org
Subject: Triggers to create Tables
Date: 1999-02-19 17:37:57
Message-ID: 36CDA175.C0710662@linux.stuco.uni-klu.ac.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hi,

this is the part II of a question i already asked:

i have some tables:
create table css_class(nr int4, classname varchar(50));
create table css_prop(nr int4, name varchar(50), val varchar(50),
classnr int4);
(css_prop.classnr foreign key-> css_class.nr)

i would need a trigger on update and insert who takes all entries from
the tables above and put them into a textfile in the following stype

.n-th_of_css_class {
n-th_of_css_prop.name(*) : n-th_of_css_prop.val(*);
n+1-th_of_css_prop.name(*): [...]
}
.n+1-th_of_css_class { [...]

with other words: i want to create a cascading style sheet out of the
table:
css files look something like that

.cassname {
property1 : value_prop1;
property2 : value_prop2;
[...]
}
[...]

Can anyone help?
a c-function would be ok too (_really_ think that i need one) but the
file has to be created by the database itself.

Idea for the future: whole html pages built out of the databased
resulted by trigger/query combination. (not the question _yet_)

MArtin

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jackson, DeJuan 1999-02-19 18:33:19 RE: [SQL] Insert a long text
Previous Message Marc Grimme 1999-02-19 17:09:53 Re: [SQL] SQL-Query 2 get primary key