From: Jomon Skariah <jomons@aztec.soft.net>
To: josh@agliodbs.com
To: pgsql-sql@postgresql.org
Subject: Re: Porting from PL/SQL to PLPGSQL
Date: Thu, 14 Aug 2003 13:49:05 +0530
Message-ID: <F83B457BE363174B8233DE042A1445703E2412@maya.aztec.soft.net> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jomons@aztec.soft.net, josh@agliodbs.com
Subject: Re: Porting from PL/SQL to PLPGSQL
In-Reply-To: <F83B457BE363174B8233DE042A1445703E2412@maya.aztec.soft.net>
References: <F83B457BE363174B8233DE042A1445703E2412@maya.aztec.soft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox