Re: STABLE functions

From: Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: STABLE functions
Date: 2006-10-11 18:56:23
Message-ID: 1160592983.4482.205.camel@zorro.isa-geek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-10-11 18:56:46 Re: invalid data in PID file
Previous Message snacktime 2006-10-11 18:55:48 Re: [Slony1-general] Using slony with many schema's