Re: STABLE functions - Mailing list pgsql-general

From Rafal Pietrak
Subject Re: STABLE functions
Date
Msg-id 1160592983.4482.205.camel@zorro.isa-geek.com
Whole thread Raw
In response to Re: STABLE functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: STABLE functions  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
On Wed, 2006-10-11 at 10:30 -0400, Tom Lane wrote:
> > 1. I used the STABLE keyword to tell executor to evaluate the function
> > just once per statement.
>
> Wrong.  STABLE is not a directive to the system, it is a promise about
> the behavior of your function ... and you're trying to break the
> promise.

Ok. so it's semantics version.2.

> Your best bet for this is probably to put the DROP in an AFTER DELETE
> trigger on the my_users table, instead of trying to use a rule.

:) yes! Thenx Tom.

The solution was right in front of my eyes and I couldn't have seen it!!

> > BTW-2: My design would be much easier if only I counld:
> >     CREATE TABLE users(
> >        id int references pg_authid(oid) on delete cascade,
> >        .....
> >     );
> > Which I cannot, apparently. Are there technical reasons for this
> > restriction?
>
> We don't support triggers on system catalogs.

Apparently there is also no way to "foreign key reference" those, even
without installing any on-delete actions/triggers.

Pity.

Are there any plans for anything like that (referencing keys in system
tables from public schemas)?

Or may be inharitance of system tables in public schemas? (So one could
have extentions?)

--
-R

pgsql-general by date:

Previous
From: snacktime
Date:
Subject: Re: [Slony1-general] Using slony with many schema's
Next
From: Martijn van Oosterhout
Date:
Subject: Re: invalid data in PID file