On 2 April 2015 at 22:23, Robert Haas robertmh...@gmail.com wrote:
On Thu, Apr 2, 2015 at 5:02 PM, Andres Freund and...@anarazel.de wrote:
I think the upshot is that INSTEAD OF triggers work in a particular way
because that's what is needed to support updatable views. If triggers
on tables
and...@anarazel.de
Cc: Tom Lane t...@sss.pgh.pa.us; Robert Haas robertmh...@gmail.com; Aliouii
Ali aliouii@aol.fr; pgsql-hackers pgsql-hackers@postgresql.org
Sent: Wed, Apr 1, 2015 8:01 pm
Subject: Re: [HACKERS] Tables cannot have INSTEAD OF triggers
On 1 April 2015 at 18:37, Andres Freund
On Thu, Apr 2, 2015 at 5:02 PM, Andres Freund and...@anarazel.de wrote:
I think the upshot is that INSTEAD OF triggers work in a particular way
because that's what is needed to support updatable views. If triggers
on tables should behave differently, maybe it should be a separate
trigger
On 4/2/15 11:50 AM, Dean Rasheed wrote:
Well actually the fact that the code is structured that way is
somewhat academic. INSTEAD OF triggers on views don't support WHEN
conditions -- deliberately so, since it would be difficult to know in
general what to do if the trigger didn't fire. So
On 2015-04-02 16:42:43 -0400, Peter Eisentraut wrote:
On 4/2/15 11:50 AM, Dean Rasheed wrote:
Well actually the fact that the code is structured that way is
somewhat academic. INSTEAD OF triggers on views don't support WHEN
conditions -- deliberately so, since it would be difficult to know
On 2 April 2015 at 14:59, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Wed, Apr 1, 2015 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us wrote:
It would absolutely *not* be reasonable for WHEN conditions for triggers
on tables to work completely differently than they
On Wed, Apr 1, 2015 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Andres Freund and...@anarazel.de writes:
On 2015-04-01 13:29:33 -0400, Tom Lane wrote:
WHEN won't help; if there are any INSTEAD OF triggers, no insert will
happen, whether the triggers actually fire or not.
Well, right now
Robert Haas robertmh...@gmail.com writes:
On Wed, Apr 1, 2015 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us wrote:
It would absolutely *not* be reasonable for WHEN conditions for triggers
on tables to work completely differently than they do for triggers on
views. That ship's sailed.
Clue me in,
On 2015-04-01 11:40:13 -0400, Robert Haas wrote:
On Tue, Mar 31, 2015 at 8:49 AM, Aliouii Ali aliouii@aol.fr wrote:
I don't see how this helps. The problem with partitioning is that you
need a way to redirect the INSERT to another table, and there's no
built-in way to do that, so you have
On Tue, Mar 31, 2015 at 8:49 AM, Aliouii Ali aliouii@aol.fr wrote:
hi all,
back in
2011(http://www.postgresql.org/message-id/1305138588.8811.3.ca...@vanquo.pezone.net),
an question the same as this one was asked
the anwser was :
I think they're very useful on views, but I
couldn't
On 2015-04-01 13:15:26 -0400, Tom Lane wrote:
Andres Freund and...@anarazel.de writes:
On 2015-04-01 12:46:05 -0400, Robert Haas wrote:
So, the idea is that INSTEAD OF would behave like BEFORE but the tuple
it returns wouldn't actually be inserted? That wasn't clear to me
from the OP,
Tom Lane wrote:
Andres Freund and...@anarazel.de writes:
On 2015-04-01 12:46:05 -0400, Robert Haas wrote:
So, the idea is that INSTEAD OF would behave like BEFORE but the tuple
it returns wouldn't actually be inserted? That wasn't clear to me
from the OP, but I guess it would be a
On 2015-04-01 13:29:33 -0400, Tom Lane wrote:
Andres Freund and...@anarazel.de writes:
On 2015-04-01 13:15:26 -0400, Tom Lane wrote:
If you have such a trigger, it's impossible to insert any rows, which
means the table doesn't need storage, which means it may as well be a
view, no? So
On Wed, Apr 1, 2015 at 12:04 PM, Andres Freund and...@2ndquadrant.com wrote:
On 2015-04-01 11:40:13 -0400, Robert Haas wrote:
I don't see how this helps. The problem with partitioning is that you
need a way to redirect the INSERT to another table, and there's no
built-in way to do that, so
Andres Freund and...@anarazel.de writes:
On 2015-04-01 13:29:33 -0400, Tom Lane wrote:
WHEN won't help; if there are any INSTEAD OF triggers, no insert will
happen, whether the triggers actually fire or not.
Well, right now it doesn't work at all. It seems pretty reasonable to
define things
On 1 April 2015 at 18:37, Andres Freund and...@anarazel.de wrote:
On 2015-04-01 13:29:33 -0400, Tom Lane wrote:
As for partitioning, you could do this:
create table parent(...);
create table child(...) inherits(parent); -- repeat as needed
create view v as select * from parent;
attach
Andres Freund and...@anarazel.de writes:
On 2015-04-01 13:15:26 -0400, Tom Lane wrote:
If you have such a trigger, it's impossible to insert any rows, which
means the table doesn't need storage, which means it may as well be a
view, no? So this still seems to me like a wart not a useful
On 2015-04-01 12:46:05 -0400, Robert Haas wrote:
On Wed, Apr 1, 2015 at 12:04 PM, Andres Freund and...@2ndquadrant.com wrote:
On 2015-04-01 11:40:13 -0400, Robert Haas wrote:
Without INSTEAD OF you can't, to my knowledge, return a valid tuple from
the top level table without also inserting
Andres Freund and...@anarazel.de writes:
On 2015-04-01 12:46:05 -0400, Robert Haas wrote:
So, the idea is that INSTEAD OF would behave like BEFORE but the tuple
it returns wouldn't actually be inserted? That wasn't clear to me
from the OP, but I guess it would be a reasonable way to go.
I'm
hi all,
back in
2011(http://www.postgresql.org/message-id/1305138588.8811.3.ca...@vanquo.pezone.net),
an question the same as this one was asked
the anwser was :
I think they're very useful on views, but I
couldn't think of a use-case for having them on tables. ISTM that
anything an INSTEAD
On 11 May 2011 19:51, Tom Lane t...@sss.pgh.pa.us wrote:
Peter Eisentraut pete...@gmx.net writes:
Why not? Is there a fundamental problem, or just that no one wanted to
make it work?
More the latter really. I think they're very useful on views, but I
couldn't think of a use-case for having
Why not? Is there a fundamental problem, or just that no one wanted to
make it work?
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Peter Eisentraut pete...@gmx.net writes:
Why not? Is there a fundamental problem, or just that no one wanted to
make it work?
I'm fairly sure there was a substantive issue, but memory fails as to
what it was. You could try removing the error check and see what
breaks ...
23 matches
Mail list logo