On 2 April 2015 at 22:23, Robert Haas wrote:
> On Thu, Apr 2, 2015 at 5:02 PM, Andres Freund 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
On Thu, Apr 2, 2015 at 5:02 PM, Andres Freund 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 type. Maybe it
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
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 E
On 2 April 2015 at 14:59, Tom Lane wrote:
> Robert Haas writes:
>> On Wed, Apr 1, 2015 at 1:56 PM, Tom Lane 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
Robert Haas writes:
> On Wed, Apr 1, 2015 at 1:56 PM, Tom Lane 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, because I'm confused. If no tri
On Wed, Apr 1, 2015 at 1:56 PM, Tom Lane wrote:
> Andres Freund 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
nd
Cc: Tom Lane ; Robert Haas ; Aliouii
Ali ; pgsql-hackers
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 wrote:
> On
2015-04-01 13:29:33 -0400, Tom Lane wrote:
>> As for partitioning, you c
On 1 April 2015 at 18:37, Andres Freund 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 INSTEAD OF
Andres Freund 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 so that the
On 2015-04-01 13:29:33 -0400, Tom Lane wrote:
> Andres Freund 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 stil
Andres Freund 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 feature.
>> I thi
Tom Lane wrote:
> Andres Freund 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 wa
On 2015-04-01 13:15:26 -0400, Tom Lane wrote:
> Andres Freund 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 gue
Andres Freund 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 not sure w
On 2015-04-01 12:46:05 -0400, Robert Haas wrote:
> On Wed, Apr 1, 2015 at 12:04 PM, Andres Freund 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 into it. Returni
On Wed, Apr 1, 2015 at 12:04 PM, Andres Freund 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 you have to simula
On 2015-04-01 11:40:13 -0400, Robert Haas wrote:
> On Tue, Mar 31, 2015 at 8:49 AM, Aliouii Ali 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 to simulate it
On Tue, Mar 31, 2015 at 8:49 AM, Aliouii Ali 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 think of a use-
On 11 May 2011 19:51, Tom Lane wrote:
> Peter Eisentraut 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 them on tables. ISTM that
any
Peter Eisentraut 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 ...
regards, t
21 matches
Mail list logo