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 0ACD7D1C7F1 for ; Wed, 13 Aug 2003 19:38:47 +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 62918-04 for ; Wed, 13 Aug 2003 16:37:11 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 17456D1C4E3 for ; Wed, 13 Aug 2003 16:38:36 -0300 (ADT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3509967; Wed, 13 Aug 2003 12:37:09 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Jomon Skariah , pgsql-sql@postgresql.org Subject: Re: Porting from PL/SQL to PLPGSQL Date: Wed, 13 Aug 2003 12:35:23 -0700 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200308131235.23507.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/159 X-Sequence-Number: 14775 Jomon, > 1) In Exceptions ORACLE have something called WHEN OTHERS THEN cluase.I > can't find a replacement for that in=20 > PostGreSQL. PL/pgSQL currently does not handle exceptions at all. This is on the TODO= =20 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 sessio= n=20 information. See the "PostgreSQL Administration" section of the=20 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=20 triggers. Please lookup CREATE RULE in the online docs. --=20 -Josh Berkus Aglio Database Solutions San Francisco