Re: Ticket 256: add INSTEAD OF support for triggers

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Subject: Re: Ticket 256: add INSTEAD OF support for triggers
Date: 2010-11-05 06:19:25
Message-ID: 4CD3A1ED.5050902@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Le 24/10/2010 00:18, Dave Page a écrit :
> [Ashesh, if you haven't aready, I suggest reviewing this thread. It
> may shed some light on that Rule weirdness on Solaris]
>
> On Sat, Oct 23, 2010 at 11:03 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>>> pgView derives from pgSchemaObject
>>
>> Actually, pgView derives from pgRuleObject, which is already weird by
>> itself but makes the whole thing even more weird.
>
> Oh, I misread that. pgView*Factory* derives from pgSchemaObj*Factory*.
> Which seems bizarre.
>
>>> pgColumn derives from pgTableObject
>>
>> Seems logical.
>>
>>> and:
>>>
>>> pgRule derives from pgRuleObject
>>> pgRuleObject derives from pgSchemaObject
>>
>> Which just doesn't make sense. I would really like to know the reason of
>> all this.
>
> I think the point is, that pgRule can't be a descendent of a table or
> a view (in the inheritance hierarchy), because it is a descendent of
> both (logically).
>
>>> My guess is to do this properly you'll probably have to create a
>>> similar pgTriggerObject class (or make pgRuleObject into a more
>>> generic pgRelationObject), and then add properties to represent the
>>> table/view directly to pgTrigger and re-parent it appropriately.
>>
>> Will look into this.
>>
>> Thanks for your remarks. I hope to come up with something. We'll
>> probably need someone more knowledgable than me with C++.
>
> I don't think it needs "more C++ knowledge", just some patience to
> untangle things. Do you know of any tools that can automatically
> visually display the object model and members? I'm sure there used to
> be something in Visual Studio, but I can't find it atm.
>

Some patience, yeah, I did use that :)

New patch attached. Works good for me.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

Attachment Content-Type Size
insteadof_trigger_v1.patch text/x-diff 14.0 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2010-11-07 05:40:58 Re: Ticket 256: add INSTEAD OF support for triggers
Previous Message Dave Page 2010-11-04 20:21:01 pgAdmin III commit: Fix a potential crash