From: Martin Möderndorfer <mmoedern@linux.stuco.uni-klu.ac.at>
To: pgsql-sql@postgresql.org
Subject: Triggers to create Tables
Date: Fri, 19 Feb 1999 18:37:57 +0100
Message-ID: <36CDA175.C0710662@linux.stuco.uni-klu.ac.at> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mmoedern@linux.stuco.uni-klu.ac.at
Subject: Re: Triggers to create Tables
In-Reply-To: <36CDA175.C0710662@linux.stuco.uni-klu.ac.at>
References: <36CDA175.C0710662@linux.stuco.uni-klu.ac.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox