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 17425D1C4D6 for ; Wed, 13 Aug 2003 19:50:26 +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 63923-01 for ; Wed, 13 Aug 2003 16:48:50 -0300 (ADT) Received: from mailav.tor1.inquent.com (mail.inquent.com [216.208.117.106]) by svr1.postgresql.org (Postfix) with ESMTP id 567C6D1C4E3 for ; Wed, 13 Aug 2003 16:50:15 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mailav.tor1.inquent.com (Postfix) with ESMTP id 8866B1024D; Wed, 13 Aug 2003 15:42:43 -0400 (EDT) Received: from [10.0.2.6] (unknown [10.0.2.6]) by mailav.tor1.inquent.com (Postfix) with ESMTP id 81CAE10248; Wed, 13 Aug 2003 15:42:41 -0400 (EDT) Subject: Re: Porting from PL/SQL to PLPGSQL From: Rod Taylor To: Jomon Skariah Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-l33vxrZfVehRNctuK3Fw" Message-Id: <1060804215.11688.76.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Wed, 13 Aug 2003 15:50:16 -0400 X-Virus-Scanned: by AMaViS perl-11 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/160 X-Sequence-Number: 14776 --=-l33vxrZfVehRNctuK3Fw Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > we are facing a few problems with PL/SQL Code.. >=20 > 1) In Exceptions ORACLE have something called WHEN OTHERS THEN cluase.I > can't find a replacement for that in=20 > PostGreSQL. What does it do? =09 > 2 Oracle have a function USERENV to get the user session > information.Is there any replacement available in PostGres. ? CURRENT_USER (I believe this is per spec) > 3 Is there any replace available for INSTEAD OF INSERT/DELETE/UPDATE > for triggers in PostGreSQL. You might have some luck with Rules (CREATE RULE) if you are writing data to a different table. Otherwise you're stuck with somewhat more complicated triggers. --=-l33vxrZfVehRNctuK3Fw Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA/OpZ36DETLow6vwwRAuBrAJ9dhuIl+rT8Fje/gEFC3eeI+tf0QACghpgA s/cGsRg1q2jGKwR5TmGSbAQ= =nimY -----END PGP SIGNATURE----- --=-l33vxrZfVehRNctuK3Fw--