Re: create rule x as on select...do insert - when?

From: wieck(at)debis(dot)com (Jan Wieck)
To: M(dot)Mazurek(at)poznan(dot)multinet(dot)pl
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: create rule x as on select...do insert - when?
Date: 2000-04-12 12:21:45
Message-ID: m12fM9R-0003lFC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hi all,
> I'm trying to create simple rule:
> nieruchomosci=> create rule log_select as
> on select to oferty do insert into log_oferty (nr) values(oferty.nr);
> ERROR: only instead-select rules currently supported on select
> nieruchomosci=>
>
> pg 6.5.3 on linux, am I forced to create a trigger or is there a simpler
> solution. It is to be a simple rule which is to log to another relation
> information about touples selected in query.
> creating view is not helpfull, because i have to store my data at once in
> log relation not in a view.
>
> any hints?

You cannot log SELECT events, neither with rules nor with
triggers, in Postgres. This feature doesn't exist and isn't
planned.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Perréal 2000-04-12 12:26:57 Getting number of days in a month
Previous Message Adrian Urquhart 2000-04-12 12:16:08 Re: Can't load plpgsql.so error [SOLVED]