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 5BCFE3A5852 for ; Tue, 25 Jan 2005 20:18:43 +0000 (GMT) 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 15769-01 for ; Tue, 25 Jan 2005 20:18:31 +0000 (GMT) Received: from illusions.com (unknown [69.28.129.146]) by svr1.postgresql.org (Postfix) with SMTP id 777053A584C for ; Tue, 25 Jan 2005 20:18:29 +0000 (GMT) Received: (qmail 29691 invoked from network); 25 Jan 2005 20:18:58 -0000 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by illusions.com with SMTP; 25 Jan 2005 20:18:58 -0000 Message-ID: <41F6A9DA.20500@illusions.com> Date: Tue, 25 Jan 2005 13:19:38 -0700 From: Dennis Sacks User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Moving from Transact SQL to PL/pgSQL References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------060506020609010502090104" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.964 tagged_above=0 required=5 tests=AWL, HTML_50_60, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200501/237 X-Sequence-Number: 20025 This is a multi-part message in MIME format. --------------060506020609010502090104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kevin Duffy wrote: > Hello: > > I am starting a project using Postgres. The requirements are very > similar to work I have done in the past using M$-SQL. Therefore, > there are many Transact SQL stored procedures I need to port over to > PL/pgSQL. > > Where would I find documentation on PL/pgSQL, with examples? > > How close to Oracle PL-SQL is Postgres? Would a Oracle PL-SQL book > cover the basics? > Oracle PL-SQL and PL/pgSQL seem very similar. There are definitely differences however. Most of what you want to know is included in the PostgreSQL document. I'd recommend reading through the PL/pgSQL chapter several times before you begin. _PostgreSQL_ by Douglas and Douglas has a chapter on PL/pgSQL. I'm not sure what that chapter is like as I don't own this book. It might be worth looking into. I don't know of any documents that give hints for porting from TSQL to PL/pgSQL, but then I've not looked for any. They may exist. Best of luck, Dennis Sacks dennis@illusions.com --------------060506020609010502090104 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Kevin Duffy wrote:
Hello:
 
I am starting a project using Postgres.  The requirements are very similar to work I have done in the past using M$-SQL.  Therefore, there are many Transact SQL stored procedures I need to port over to PL/pgSQL.
 
Where would I find documentation on PL/pgSQL, with examples? 
 
How close to Oracle PL-SQL is Postgres?  Would a Oracle PL-SQL book cover the basics?
 
Oracle PL-SQL and PL/pgSQL seem very similar. There are definitely differences however. Most of what you want to know is included in the PostgreSQL document. I'd recommend reading through the PL/pgSQL chapter several times before you begin.

_PostgreSQL_ by Douglas and Douglas has a chapter on PL/pgSQL. I'm not sure what that chapter is like as I don't own this book. It might be worth looking into.

I don't know of any documents that give hints for porting from TSQL to PL/pgSQL, but then I've not looked for any. They may exist.


Best of luck,

Dennis Sacks
dennis@illusions.com

--------------060506020609010502090104--