From senthil.kandaswamy@mobax.com Tue Dec 31 05:05:23 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7842F475BA0 for ; Tue, 31 Dec 2002 00:05:23 -0500 (EST) Received: from mobax.com (mh10.voicegateway.com [64.124.36.200]) by postgresql.org (Postfix) with ESMTP id A64774758BD for ; Tue, 31 Dec 2002 00:05:22 -0500 (EST) Received: from Earth [203.195.200.5] by mobax.com with ESMTP (SMTPD32-7.13) id A5F434D0130; Mon, 30 Dec 2002 21:07:00 -0800 Message-ID: <001301c2b08b$05b3b000$67cac9c8@mobax.com> From: "Senthil" To: Subject: Stored procedures doubts Date: Tue, 31 Dec 2002 10:40:54 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01C2B0B9.184971E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Declude-Sender: senthil.kandaswamy@mobax.com [203.195.200.5] X-Declude-Spoolname: D25f4034d013086ae.SMD X-Note: This E-mail was scanned for outbound spam. X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/327 X-Sequence-Number: 6822 This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C2B0B9.184971E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hai everybody, =20=20 Hai,=20 Currently, I'm at the work of converting database from Oracle to Postgre= sql. I have some doubts: 1) What is the equivalent of Oracle ROWNUM in Postgresql? If ther= e is no such equivalent, can U give me an idea about that? 2) How to replace stored procedures with many OUT parameters? I w= ant to call the procedure from Java code. Please tell me the way to return the values of OUT parameters = returned previously by Oracle, from the plpgsql code. It's very urgent. Please reply quickly with some code exampl= es. HOW to handle the values returned by the Oracle OUT paramet= ers, in Postgresql? i.e, how to return the Oracle OUT parameters' values to th= e calling Java code, in postgresql. If anybody knows, please explain with suitable examples wit= h plpgsql code and also the Calling Java code. 3) Can default values be assigned to postgresql function parameter= s? If yes, how?=20 Thanks in advance. Senthil. ------=_NextPart_000_0010_01C2B0B9.184971E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hai everybody,
 =20
Hai,
   Currently, I'm at th= e work of=20 converting database from Oracle to Postgresql.
   I have some= =20 doubts:

         1) What is the=20 equivalent of Oracle ROWNUM in Postgresql?  If there is no such equiva= lent,=20 can U give me an idea about        =20        =20 that?
         2) How to replace= =20 stored procedures with many OUT parameters?  I want to call the proced= ure=20 from Java=20 code.
           =  =20 Please tell me the way to return the values of OUT parameters returned=20 previously by Oracle, from the plpgsql=20 code.
           =   =20 It's very urgent.  Please reply quickly with some code examples.
 
           &nbs= p;    HOW=20 to handle the values returned by the Oracle OUT parameters, in Postgresql?<= /DIV>
           &nbs= p;   =20 i.e, how to return the Oracle OUT parameters'  values to the calling J= ava=20 code, in postgresql.
           &nbs= p;   =20 If anybody knows, please explain with suitable examples with plpgsql c= ode=20 and also the Calling Java code.

         3) Can default va= lues=20 be assigned to postgresql function parameters?  If yes, how?
 
 
Thanks in advance.
Senthil.
------=_NextPart_000_0010_01C2B0B9.184971E0-- From jie@stbernard.com Tue Dec 31 19:35:17 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4CE1C475C85 for ; Tue, 31 Dec 2002 14:35:17 -0500 (EST) Received: from mail01.stbernard.com (mail01.stbernard.com [64.154.93.162]) by postgresql.org (Postfix) with ESMTP id 0A4564758FE for ; Tue, 31 Dec 2002 14:35:16 -0500 (EST) Received: by mail01.stbernard.com with Internet Mail Service (5.5.2653.19) id ; Tue, 31 Dec 2002 11:35:16 -0800 Message-ID: From: Jie Liang To: 'Senthil' , pgsql-admin@postgresql.org Subject: Re: Stored procedures doubts Date: Tue, 31 Dec 2002 11:35:16 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2B103.BEAAFB90" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/341 X-Sequence-Number: 6836 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C2B103.BEAAFB90 Content-Type: text/plain; charset="iso-8859-1" read docs 19.11. porting from oracle pl/sql coming with tarball or http://www.postgresql.org/idocs/index.php?plpgsql-porting.html it's section 23.11. Jie Liang -----Original Message----- From: Senthil [mailto:senthil.kandaswamy@mobax.com] Sent: Monday, December 30, 2002 9:11 PM To: pgsql-admin@postgresql.org Subject: [ADMIN] Stored procedures doubts Hai everybody, Hai, Currently, I'm at the work of converting database from Oracle to Postgresql. I have some doubts: 1) What is the equivalent of Oracle ROWNUM in Postgresql? If there is no such equivalent, can U give me an idea about that? 2) How to replace stored procedures with many OUT parameters? I want to call the procedure from Java code. Please tell me the way to return the values of OUT parameters returned previously by Oracle, from the plpgsql code. It's very urgent. Please reply quickly with some code examples. HOW to handle the values returned by the Oracle OUT parameters, in Postgresql? i.e, how to return the Oracle OUT parameters' values to the calling Java code, in postgresql. If anybody knows, please explain with suitable examples with plpgsql code and also the Calling Java code. 3) Can default values be assigned to postgresql function parameters? If yes, how? Thanks in advance. Senthil. ------_=_NextPart_001_01C2B103.BEAAFB90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
read=20 docs 19.11. porting from oracle pl/sql coming with tarball=20 or
 
htt= p://www.postgresql.org/idocs/index.php?plpgsql-porting.html
 
it's=20 section 23.11.
 
 
Jie=20 Liang
 
-----Original Message-----
From: Senthil=20 [mailto:senthil.kandaswamy@mobax.com]
Sent: Monday, December 30= ,=20 2002 9:11 PM
To: pgsql-admin@postgresql.org
Subject:= =20 [ADMIN] Stored procedures doubts

Hai everybody,
 =20
Hai,
   Currently, I'm at = the work=20 of converting database from Oracle to Postgresql.
   I have = some=20 doubts:

         1) What is the= =20 equivalent of Oracle ROWNUM in Postgresql?  If there is no such=20 equivalent, can U give me an idea about       &n= bsp;=20        =20 that?
         2) How to repla= ce=20 stored procedures with many OUT parameters?  I want to call the proc= edure=20 from Java=20 code.
          &nbs= p; =20 Please tell me the way to return the values of OUT parameters returned=20 previously by Oracle, from the plpgsql=20 code.
          &nbs= p;  =20 It's very urgent.  Please reply quickly with some code examples.
 
           &n= bsp;    HOW=20 to handle the values returned by the Oracle OUT parameters, in=20 Postgresql?
           &n= bsp;   =20 i.e, how to return the Oracle OUT parameters'  values to the calling= Java=20 code, in postgresql.
           &n= bsp;   =20 If anybody knows, please explain with suitable examples with plpgsql= code=20 and also the Calling Java code.

         3) Can default= =20 values be assigned to postgresql function parameters?  If yes, how?= =20
 
 
Thanks in advance.
Senthil.
------_=_NextPart_001_01C2B103.BEAAFB90-- From senthil.kandaswamy@mobax.com Thu Jan 2 05:57:58 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CBA53476A96 for ; Thu, 2 Jan 2003 00:57:58 -0500 (EST) Received: from mobax.com (mh10.voicegateway.com [64.124.36.200]) by postgresql.org (Postfix) with ESMTP id 835FF476B7C for ; Thu, 2 Jan 2003 00:37:27 -0500 (EST) Received: from Earth [203.195.200.5] by mobax.com with ESMTP (SMTPD32-7.13) id A05538D0124; Wed, 01 Jan 2003 21:38:29 -0800 Message-ID: <006a01c2b221$b9f1ed60$67cac9c8@mobax.com> From: "Senthil" To: "Jie Liang" , References: Subject: Re: Stored procedures doubts Date: Thu, 2 Jan 2003 11:11:35 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0067_01C2B24F.B696ECA0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 Disposition-Notification-To: "Senthil" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Declude-Sender: senthil.kandaswamy@mobax.com [203.195.200.5] X-Declude-Spoolname: Dd055038d01245974.SMD X-Note: This E-mail was scanned for outbound spam. X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/8 X-Sequence-Number: 6850 This is a multi-part message in MIME format. ------=_NextPart_000_0067_01C2B24F.B696ECA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hai everybody, Thanks for Ur immediate reply, Jie Liang. I had gone through the document plpgsql-porting.html, U mentioned a= lready. It was quite useful.=20 1) But, in that there is nothing about the Calling of plpgsql funct= ion(equivalent of Oracle stored procedure with many OUT parameters) = from java code and returning of the plpgsql values corresponding to the Ora= cle OUT parameter, to the Java code, as this is my current issue to be solv= ed urgently. I want some answers related to this. =20=20=20=20=20=20=20=20 2) Moreover, somebody had said that OID in postgresql is the equivalent of = Oracle's ROWNUM.=20 I cannot agree this, because Oracle's ROWNUM is table-specific= , whereas postgresql OID is database specific. Because of this difference, I'm unable to delete from tables b= ased on ROWNUM, which I was asked to do. Can anybody help me out to solve this issue, as quickly as pos= sible? =20=20=20=20=20=20=20=20 3) What is the syntax for plpgsql GOTO label. When I use like this, I get = some parse errors: start: ..... .....=20=20=20=20 .... GOTO start; How to solve this issue? Can anybody point out, where I am going wron= g? 4) My Oracle stored procedure which is to be converted to plpgsql function = contains EXIT WHEN SQL%ROWCOUNT =3D 0; TO COME OUT OF A LOOP. How should it be converted in postgresql? =20=20=20 Since I'm in need of the answers very urgently, please send the answers as = quickly as possible. I'll be happy if I can get the answers by today or tomorrow. Thanks everybody in advance. Senthil=20=20 ------=_NextPart_000_0067_01C2B24F.B696ECA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hai everybody,
       = Thanks=20 for Ur immediate reply, Jie Liang.
       = I had=20 gone through the document plpgsql-porting.html, U mentioned=20 already.
       = It was=20 quite useful.
       = 1) But,=20 in that there is nothing about the Calling of plpgsql function(equivalent o= f=20 Oracle stored procedure with many OUT      &n= bsp;=20 parameters) from java code and returning of the plpgsql values=20 corresponding to the Oracle OUT parameter, to the Java code, as this is my= =20 current issue to be solved urgently.
       = I want=20 some answers related to this.
       = =20
2) Moreover, somebody had said that O= ID in=20 postgresql is the equivalent of Oracle's ROWNUM. 
           =  =20 I cannot agree this, because Oracle's ROWNUM is table-specific, whereas=20 postgresql OID is database specific.
           =  =20 Because of this difference, I'm unable to delete from tables based on ROWNU= M,=20 which I was asked to do.
           =   Can=20 anybody help me out to solve this issue, as quickly as possible?
       = =20
3) What is the syntax for plpgsql GOTO lab= el. =20 When I use like this, I get some parse errors:
           =        start:
           =         =20 .....
       =20             .....  &= nbsp;=20
       =20             ....
           =        GOTO=20 start;
     How to solve this= =20 issue?  Can anybody point out, where I am going wrong?
4) My Oracle stored procedure which is to = be=20 converted to plpgsql function contains
          EXIT WHEN= =20 SQL%ROWCOUNT =3D 0; TO COME OUT OF A LOOP.
   How should it be co= nverted=20 in postgresql?
  
Since I'm in need of the answers very urge= ntly,=20 please send the answers as quickly as possible.
 
I'll be happy if I can get the answers by = today or=20 tomorrow.
 
Thanks everybody in advance.
Senthil  
 
------=_NextPart_000_0067_01C2B24F.B696ECA0-- From senthil.kandaswamy@mobax.com Tue Jan 7 03:49:20 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 317D04762D7 for ; Mon, 6 Jan 2003 22:49:20 -0500 (EST) Received: from mobax.com (mh10.voicegateway.com [64.124.36.200]) by postgresql.org (Postfix) with ESMTP id 259D04762CF for ; Mon, 6 Jan 2003 22:49:19 -0500 (EST) Received: from Earth [203.195.200.9] by mobax.com with ESMTP (SMTPD32-7.13) id AE9D495011C; Mon, 06 Jan 2003 19:50:53 -0800 Message-ID: <001101c2b600$7399a6e0$67cac9c8@mobax.com> From: "Senthil" To: "David Sanchez" Cc: References: <006a01c2b221$b9f1ed60$67cac9c8@mobax.com> <004b01c2b5d5$f4105dd0$1409a8c0@local> Subject: Re: Stored procedures doubts Date: Tue, 7 Jan 2003 09:24:06 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Declude-Sender: senthil.kandaswamy@mobax.com [203.195.200.9] X-Declude-Spoolname: D4e9d0495011cd2db.SMD X-Note: This E-mail was scanned for outbound spam. X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/46 X-Sequence-Number: 6888 Hai David, Thousands of thanks for Ur detailed explanation regarding my doubts. It was quiet useful. Thanks, Senthil