Re: trigger inheritance - Mailing list pgsql-general

From Tom Lane
Subject Re: trigger inheritance
Date
Msg-id 2862.994342412@sss.pgh.pa.us
Whole thread Raw
In response to trigger inheritance  (fcanedo@soneramail.nl)
Responses Re: trigger inheritance
List pgsql-general
fcanedo@soneramail.nl writes:
> In the reference manual (CREATE TABLE) it says "Postgres
> automatically allows the created table to inherit functions on tables
> above it in the inheritance hierarchy."

> Since functions don't belong to tables (correct me if I'm wrong)

Okay, you're wrong.

What that sentence is referring to is the fact that functions declared
as taking table row types can be applied to rows of derived tables as
well as the one they were originally declared against.  (I'm not sure
how well this actually works in cases involving multiple inheritance
or ALTER TABLE, but in simple cases it should be OK.)

Triggers and indexes are not inherited.  Yes, that's probably a bug.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Trigger with current user
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Partial indicies done