X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0A551D1DDDE for ; Sat, 13 Dec 2003 14:56:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 05790-01 for ; Sat, 13 Dec 2003 10:55:36 -0400 (AST) Received: from lakemtao01.cox.net (lakemtao01.cox.net [68.1.17.244]) by svr1.postgresql.org (Postfix) with ESMTP id B95C4D1D10B for ; Sat, 13 Dec 2003 10:55:31 -0400 (AST) Received: from [192.168.0.13] ([24.170.201.69]) by lakemtao01.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031213145536.WLML23168.lakemtao01.cox.net@[192.168.0.13]>; Sat, 13 Dec 2003 09:55:36 -0500 From: Robert Treat To: cstotesbery@acm.org, "Clint Stotesbery" , ch@rodos.fzk.de Subject: Re: Help converting Oracle instead of triggers to PostgreSQL Date: Sat, 13 Dec 2003 09:55:33 -0500 User-Agent: KMail/1.5 Cc: pgsql-sql@postgresql.org References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312130955.33685.xzilla@users.sourceforge.net> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/99 X-Sequence-Number: 16265 Just to follow up I managed to track down these missing articles and have updated the links on the website. 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 > To: cstotesbery@acm.org > CC: pgsql-sql@postgresql.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