From: shreedhar <shreedhar@lucidindia.net>
To: PostgreSQL <pgsql-admin@postgresql.org>
Subject: problem using trigger
Date: Fri, 10 May 2002 10:33:26 +0530
Message-ID: <001201c1f7e0$04e5ab60$1201a8c0@a4005> (raw)
Hi All,
It is not a Admin question, But it is part of Administration. I would like
store details of groups as well as users in to my dummy table as i inserted
into pg_user as well as pg_group.
for that i created a dummy table for pg_group with same structure.
gdump;
i created a function aa_insertgdump with the following script
No input parameters, return value is integer, language plpgsql
declare
gid integer;
begin
select max(grosysid) into gid from pg_group;
insert into gdump select * from pg_group where grosysid = gid);
return 1;
end;
I thought of executing this function using a trigger after insertion into
pg_group.
create trigger gdumptable after insert on pg_group for each row execute
procedure aa_insertgdump();
but, it is giving error as "can't create trigger for system relation
pg_group".
Can any one suggest what is the solution to my problem.
regards,
bhaskarraju.
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-admin@postgresql.org
Cc: shreedhar@lucidindia.net
Subject: Re: problem using trigger
In-Reply-To: <001201c1f7e0$04e5ab60$1201a8c0@a4005>
References: <001201c1f7e0$04e5ab60$1201a8c0@a4005>
* 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