From dpandey@secf.com Mon Apr 4 13:43:56 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A38705342B; Mon, 4 Apr 2005 14:43:56 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13828-05; Mon, 4 Apr 2005 13:43:39 +0000 (GMT) Received: from secf.com (209-128-104-244.bayarea.net [209.128.104.244]) by svr1.postgresql.org (Postfix) with ESMTP id 168FF53400; Mon, 4 Apr 2005 14:43:38 +0100 (BST) Received: from dinesh by secf.com (MDaemon.PRO.v7.2.2.R) with ESMTP id md50000576091.msg; Mon, 04 Apr 2005 06:44:00 -0700 Reply-To: From: "Dinesh Pandey" To: , Subject: Migrated Oracle database to PostgreSQL ?? Date: Mon, 4 Apr 2005 19:11:17 +0530 Organization: Second Foundation India P Ltd. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01C5394A.164E71D0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 thread-index: AcU5G/olnBFaDt3uQp2kxh5qQtybyg== X-Authenticated-Sender: dpandey@secf.com X-Spam-Processed: mail.secf.com, Mon, 04 Apr 2005 06:44:00 -0700 (not processed: message from valid local sender) X-MDRemoteIP: 220.227.32.11 X-Return-Path: dpandey@secf.com X-MDAV-Processed: mail.secf.com, Mon, 04 Apr 2005 06:44:01 -0700 Message-Id: <20050404134338.168FF53400@svr1.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.47 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, HTML_MESSAGE, MSGID_FROM_MTA_ID X-Spam-Level: * X-Archive-Number: 200504/46 X-Sequence-Number: 20939 This is a multi-part message in MIME format. ------=_NextPart_000_0025_01C5394A.164E71D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi there, Has anyone migrated Oracle database to PostgreSQL? If yes, could you please help me - 1. How to migrate Procedures and Packages from Oracle to PostgreSQL???? 2. How to find error messages in PostgreSQL thrown from an Exception (as we can get messages in Oracle with "SQLERRM" keyword) for example -- --Raise an exception RAISE EXCEPTION 'No Data found for record id % ' ,recordid --Insert exception messages into database EXCEPTION IF RAISE_EXCEPTION THEN -- my_insert_function(SQLERRM); Thanks in advance. Regards Dinesh Pandey ------=_NextPart_000_0025_01C5394A.164E71D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
 Hi there,

Has anyone = migrated=20 Oracle database to PostgreSQL? If yes, could you please help me=20 - 
 
1.=20 How to migrate Procedures and = Packages=20 from Oracle to PostgreSQL????
 
 
2.=20 How to find error messages in PostgreSQL thrown from an Exception (as we = can get=20 messages in Oracle with "SQLERRM"=20 keyword)
    for example=20 --
 
--Raise an=20 exception
    RAISE EXCEPTION 'No Data = found for=20 record id % ' ,recordid
 
--Insert exception messages into=20 database
   =20 EXCEPTION
        IF = RAISE_EXCEPTION THEN
--       &n= bsp;   =20 my_insert_function(SQLERRM);
 
 
Thanks in=20 advance.

Regards
Dinesh Pandey





 
------=_NextPart_000_0025_01C5394A.164E71D0-- From ymalik@cs.stevens.edu Mon Apr 4 19:36:01 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CFFEC533A3 for ; Mon, 4 Apr 2005 20:36:01 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35027-06 for ; Mon, 4 Apr 2005 19:36:00 +0000 (GMT) Received: from guinness.cs.stevens.edu (guinness.cs.stevens-tech.edu [155.246.89.8]) by svr1.postgresql.org (Postfix) with ESMTP id 69B93533A0 for ; Mon, 4 Apr 2005 20:35:59 +0100 (BST) Received: from pink-elephant.cs.stevens.edu (pink-elephant.cs.stevens-tech.edu [155.246.81.117]) by guinness.cs.stevens.edu (Postfix) with ESMTP id 4BED7141648 for ; Mon, 4 Apr 2005 15:35:58 -0400 (EDT) Received: by pink-elephant.cs.stevens.edu (Postfix, from userid 4405) id E7F751EFDCA; Mon, 4 Apr 2005 15:35:57 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by pink-elephant.cs.stevens.edu (Postfix) with ESMTP id B24ED1EFB0E for ; Mon, 4 Apr 2005 15:35:57 -0400 (EDT) Date: Mon, 4 Apr 2005 15:35:57 -0400 (EDT) From: Yasir Malik X-X-Sender: ymalik@pink-elephant.cs.stevens-tech.edu To: PostgreSQL Subject: Re: Migrated Oracle database to PostgreSQL ?? In-Reply-To: <20050404134338.168FF53400@svr1.postgresql.org> Message-ID: References: <20050404134338.168FF53400@svr1.postgresql.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/47 X-Sequence-Number: 20940 > 1. How to migrate Procedures and Packages from Oracle to PostgreSQL???? > > > 2. How to find error messages in PostgreSQL thrown from an Exception (as we > can get messages in Oracle with "SQLERRM" keyword) > for example -- > > --Raise an exception > RAISE EXCEPTION 'No Data found for record id % ' ,recordid > > --Insert exception messages into database > EXCEPTION > IF RAISE_EXCEPTION THEN > -- my_insert_function(SQLERRM); All your answers can be found here: http://www.postgresql.org/docs/8.0/static/plpgsql.html I can't say if PL/pgSQL is as good as PL/SQL, though. Yasir From dpandey@secf.com Mon Apr 4 20:00:13 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 36FA2533DB for ; Mon, 4 Apr 2005 21:00:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 42380-04 for ; Mon, 4 Apr 2005 20:00:04 +0000 (GMT) Received: from secf.com (209-128-104-244.bayarea.net [209.128.104.244]) by svr1.postgresql.org (Postfix) with ESMTP id 50FBB52968 for ; Mon, 4 Apr 2005 21:00:03 +0100 (BST) Received: from dinesh by secf.com (MDaemon.PRO.v7.2.2.R) with ESMTP id md50000577301.msg for ; Mon, 04 Apr 2005 13:00:12 -0700 Reply-To: From: "Dinesh Pandey" To: "'Yasir Malik'" , "'PostgreSQL'" Subject: Re: Migrated Oracle database to PostgreSQL ?? Date: Tue, 5 Apr 2005 01:27:30 +0530 Organization: Second Foundation India P Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: Thread-Index: AcU5T/N6nb011//6RTaki/ENQ49+dwAAFN0A X-Authenticated-Sender: dpandey@secf.com X-Spam-Processed: mail.secf.com, Mon, 04 Apr 2005 13:00:12 -0700 (not processed: message from valid local sender) X-MDRemoteIP: 220.227.32.11 X-Return-Path: dpandey@secf.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-MDAV-Processed: mail.secf.com, Mon, 04 Apr 2005 13:00:13 -0700 Message-Id: <20050404200003.50FBB52968@svr1.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.409 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, MSGID_FROM_MTA_ID X-Spam-Level: * X-Archive-Number: 200504/48 X-Sequence-Number: 20941 Yes, but after creating some function, we can get sql error messages. But I not comfortable that much in that. For Procedures and Packages we can use Functions.... Any other option in pl/PGSQL???? Thanks Dinesh Pandey -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Yasir Malik Sent: Tuesday, April 05, 2005 1:06 AM To: PostgreSQL Subject: Re: [SQL] Migrated Oracle database to PostgreSQL ?? > 1. How to migrate Procedures and Packages from Oracle to PostgreSQL???? > > > 2. How to find error messages in PostgreSQL thrown from an Exception > (as we can get messages in Oracle with "SQLERRM" keyword) > for example -- > > --Raise an exception > RAISE EXCEPTION 'No Data found for record id % ' ,recordid > > --Insert exception messages into database > EXCEPTION > IF RAISE_EXCEPTION THEN > -- my_insert_function(SQLERRM); All your answers can be found here: http://www.postgresql.org/docs/8.0/static/plpgsql.html I can't say if PL/pgSQL is as good as PL/SQL, though. Yasir ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend