Re: Porting from PL/SQL to PLPGSQL

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Jomon Skariah <jomons(at)aztec(dot)soft(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Porting from PL/SQL to PLPGSQL
Date: 2003-08-13 19:50:16
Message-ID: 1060804215.11688.76.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> we are facing a few problems with PL/SQL Code..
>
> 1) In Exceptions ORACLE have something called WHEN OTHERS THEN cluase.I
> can't find a replacement for that in
> PostGreSQL.

What does it do?


> 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-08-13 19:53:03 Re: Why table has drop, but the foreign key still there?
Previous Message Stephan Szabo 2003-08-13 19:38:29 Re: Why table has drop, but the foreign key still there?