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

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 ma...@joh.to 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 return

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 ^^^

[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

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

2013-12-16 Thread Tom Lane
Josh Berkus j...@agliodbs.com 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

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 j...@agliodbs.com 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

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 j...@agliodbs.com wrote: On 12/16/2013 04:22 PM, Tom Lane wrote: Josh Berkus j...@agliodbs.com 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