Triggers to create Tables
| От | Martin Möderndorfer |
|---|---|
| Тема | Triggers to create Tables |
| Дата | |
| Msg-id | 36CDA175.C0710662@linux.stuco.uni-klu.ac.at обсуждение исходный текст |
| Ответы |
...
|
| Список | 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
В списке pgsql-sql по дате отправления: