From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | cstotesbery(at)acm(dot)org, "Clint Stotesbery" <cstotes(at)hotmail(dot)com>, ch(at)rodos(dot)fzk(dot)de |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Help converting Oracle instead of triggers to PostgreSQL |
Date: | 2003-12-06 23:45:54 |
Message-ID: | 200312061845.54859.xzilla@users.sourceforge.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Generally speaking you can send articles to me or to webmaster(at)postgresql(dot)org
for inclusion on the techdocs site.
I'll try to update the links you mentioned below as well. thanks.
Robert Treat
On Thursday 04 December 2003 12:52, Clint Stotesbery wrote:
> Hi Christoph,
> Thanks for the links but the techdoc links for converting from Oracle to
> PostgreSQL has 2 links that don't go to their intended targets anymore, one
> is in the 7.3 docs which is really limited (only covers simple things), and
> the Ora2Pg one I don't really get that well.
>
> As far as updateable views, that's why you need instead of triggers.
> Regular triggers can't be done on views. So if I make an instead of trigger
> on a view that's for updates then I have an updateable view. I figured it
> out last night and I was along the right track in my original post with
> using an instead of rule to call a function. The trick is that I have to
> pass in all the old.col and new.col stuff into the function that I call
> from the rule. In Oracle since the instead of stuff is a trigger I had
> access to the new.col and old.col stuff. To do it in PostgreSQL rules I had
> to pass it all in. I'm going to write a doc about the problems I've
> encountered during my conversion project and then submit it to the Postgres
> people I think (to who though?). My programming and tech writing background
> should help I hope. Thanks for the suggestions Christoph.
> -Clint
>
>
> ----Original Message Follows----
> From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
> To: cstotesbery(at)acm(dot)org
> CC: pgsql-sql(at)postgresql(dot)org
> Subject: Re: [SQL] Help converting Oracle instead of triggers to PostgreSQL
> Date: Thu, 04 Dec 2003 17:16:32 MET
>
> Not sure if this is of any help ...
> AFAIK there are no updatable views in pg.
> But aside from that, I cannot see nothing what could not be
> done by a pg trigger function:
> CREATE TRIGGER name { BEFORE | AFTER } { event [OR ...] }
> ON table FOR EACH { ROW | STATEMENT }
> EXECUTE PROCEDURE func ( arguments )
>
> Also try
>
> http://techdocs.postgresql.org/#convertfrom
>
> Converting from other Databases to PostgreSQL
>
> and/or
>
> http://openacs.org/search/search?q=oracle+to+pg+porting&t=Search
>
> HTH
>
> Regards, Christoph
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
> _________________________________________________________________
> Get holiday tips for festive fun.
> http://special.msn.com/network/happyholidays.armx
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-12-06 23:54:27 | Re: Is it possible to set a NOT NULL constraint deferrable? |
Previous Message | Bruce Momjian | 2003-12-06 12:27:26 | Re: What's wrong with COPY rights in 7.3.4? |