X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0DDDED1C516 for ; Thu, 14 Aug 2003 08:20:04 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 40559-05 for ; Thu, 14 Aug 2003 05:18:27 -0300 (ADT) Received: from param.aztec.soft.net (param.aztec.soft.net [164.164.151.8]) by svr1.postgresql.org (Postfix) with ESMTP id C791DD1C943 for ; Thu, 14 Aug 2003 05:19:38 -0300 (ADT) Received: from maya.aztec.soft.net (maya.aztec.soft.net [164.164.151.5]) by param.aztec.soft.net (8.11.2/8.11.2) with ESMTP id h7E94Su01515; Thu, 14 Aug 2003 14:34:30 +0530 Received: by maya.aztec.soft.net with Internet Mail Service (5.5.2653.19) id ; Thu, 14 Aug 2003 13:49:06 +0530 Message-ID: From: Jomon Skariah To: josh@agliodbs.com, pgsql-sql@postgresql.org Subject: Re: Porting from PL/SQL to PLPGSQL Date: Thu, 14 Aug 2003 13:49:05 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/186 X-Sequence-Number: 14802 Hi Josh, Thanks for your reply. In our PL/SQL code we have used userenv('LANG') in some of the INSERT statements. Do we have a replacement for this.. Regards Jomon -----Original Message----- From: Josh Berkus [mailto:josh@agliodbs.com] Sent: Thursday, August 14, 2003 1:05 AM To: Jomon Skariah; pgsql-sql@postgresql.org Subject: Re: [SQL] Porting from PL/SQL to PLPGSQL Jomon, > 1) In Exceptions ORACLE have something called WHEN OTHERS THEN cluase.I > can't find a replacement for that in > PostGreSQL. PL/pgSQL currently does not handle exceptions at all. This is on the TODO list. > 2 Oracle have a function USERENV to get the user session > information.Is there any replacement available in PostGres. ? There are several variables and tools which provide current user and session information. See the "PostgreSQL Administration" section of the documentation. > 3 Is there any replace available for INSTEAD OF INSERT/DELETE/UPDATE > for triggers in PostGreSQL. In Postgres, this is generally done through the RULES system instead of triggers. Please lookup CREATE RULE in the online docs. -- -Josh Berkus Aglio Database Solutions San Francisco