Re: [HACKERS] Why no INSTEAD OF triggers on tables?

2013-12-17 Thread Josh Berkus
On 12/16/2013 07:53 PM, Robert Haas wrote: > So, put a BEFORE trigger, and make it return NULL. Same effect, > different notation. NOT the same: Master partition table with BEFORE trigger: josh=# insert into a ( id, val ) values ( 23, 'test' ), ( 24, 'test'), (25,'test'); INSERT 0 0 ^^

Re: [HACKERS] Why no INSTEAD OF triggers on tables?

2013-12-17 Thread Robert Haas
On Tue, Dec 17, 2013 at 3:27 AM, Marko Tiikkaja wrote: > On 12/17/13, 4:53 AM, Robert Haas wrote: >>> >>> Well, I'm specifically thinking of master partition tables. In that >>> case, we really want an INSTEAD OF trigger. >> >> /me scratches head. >> >> So, put a BEFORE trigger, and make it retur

Re: [HACKERS] Why no INSTEAD OF triggers on tables?

2013-12-17 Thread Marko Tiikkaja
On 12/17/13, 4:53 AM, Robert Haas wrote: Well, I'm specifically thinking of master partition tables. In that case, we really want an INSTEAD OF trigger. /me scratches head. So, put a BEFORE trigger, and make it return NULL. Same effect, different notation. But it's not the same effect at a

Re: [HACKERS] Why no INSTEAD OF triggers on tables?

2013-12-16 Thread Robert Haas
On Mon, Dec 16, 2013 at 9:16 PM, Josh Berkus wrote: > On 12/16/2013 04:22 PM, Tom Lane wrote: >> Josh Berkus writes: >>> I've looked in the archives, but I can't find a reason why INSTEAD OF >>> triggers were never enabled for tables. >> >> What would that mean exactly? And how would you do the

Re: [HACKERS] Why no INSTEAD OF triggers on tables?

2013-12-16 Thread Josh Berkus
On 12/16/2013 04:22 PM, Tom Lane wrote: > Josh Berkus writes: >> I've looked in the archives, but I can't find a reason why INSTEAD OF >> triggers were never enabled for tables. > > What would that mean exactly? And how would you do the actual update > when it came time to? Well, I'm specifical

Re: [HACKERS] Why no INSTEAD OF triggers on tables?

2013-12-16 Thread Tom Lane
Josh Berkus writes: > I've looked in the archives, but I can't find a reason why INSTEAD OF > triggers were never enabled for tables. What would that mean exactly? And how would you do the actual update when it came time to? > Was there a technical obstacle, or is this just a TUIT issue? It so

[HACKERS] Why no INSTEAD OF triggers on tables?

2013-12-16 Thread Josh Berkus
Hackers, I've looked in the archives, but I can't find a reason why INSTEAD OF triggers were never enabled for tables. I'm interested in them in order to return a rowcount to JDBC for INSERTs into partitioned tables. Was there a technical obstacle, or is this just a TUIT issue? -- Josh Berkus