pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedMoving from Transact SQL to PL/pgsql
7+ messages / 7 participants
[nested] [flat]
* Moving from Transact SQL to PL/pgsql
@ 2005-01-24 03:22 Duffy House <kevin07@optonline.net>
2005-01-25 21:06 ` Re: Moving from Transact SQL to PL/pgsql John DeSoi <desoi@pgedit.com>
0 siblings, 1 reply; 7+ messages in thread
From: Duffy House @ 2005-01-24 03:22 UTC (permalink / raw)
To: pgsql-sql
Hello:
I am implementing a new system using Postgres. Well most of the system will
be new,
but some parts will be very similar to a system currently running under
M$-SQL.
The first issue will be getting up to speed on PL/pgsql. Where can I find
primer on PL/pgsql, with lots of examples? How silimar is PL/pgsql to PL/SQL
under Oracle?
Thanks in Advance.
kd
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Moving from Transact SQL to PL/pgsql
2005-01-24 03:22 Moving from Transact SQL to PL/pgsql Duffy House <kevin07@optonline.net>
@ 2005-01-25 21:06 ` John DeSoi <desoi@pgedit.com>
0 siblings, 0 replies; 7+ messages in thread
From: John DeSoi @ 2005-01-25 21:06 UTC (permalink / raw)
To: Duffy House <kevin07@optonline.net>; +Cc: pgsql-sql
On Jan 23, 2005, at 10:22 PM, Duffy House wrote:
> The first issue will be getting up to speed on PL/pgsql. Where can I
> find
> primer on PL/pgsql, with lots of examples? How silimar is PL/pgsql to
> PL/SQL
> under Oracle?
The PostgreSQL documentation is the place to start:
http://www.postgresql.org/docs/8.0/interactive/plpgsql.html
The PostgreSQL distribution has a file with some examples in it:
src/test/regress/sql/plpgsql.sql
The pgEdit distribution (http://pgedit.com/download) has a fairly
extensive plpgsql example for importing and analyzing web server logs.
I'm not familiar with Oracle, but there is a porting section in the
documentation:
http://www.postgresql.org/docs/8.0/interactive/plpgsql-porting.html
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
^ permalink raw reply [nested|flat] 7+ messages in thread
* Moving from Transact SQL to PL/pgSQL
@ 2005-01-24 17:14 Kevin Duffy <kevin07@parkerglobal.com>
2005-01-25 19:19 ` Re: Moving from Transact SQL to PL/pgSQL Michael Fuhr <mike@fuhr.org>
2005-01-25 20:19 ` Re: Moving from Transact SQL to PL/pgSQL Dennis Sacks <dennis@illusions.com>
2005-01-27 02:12 ` Re: Moving from Transact SQL to PL/pgSQL Clint Stotesbery <cstotes@hotmail.com>
0 siblings, 3 replies; 7+ messages in thread
From: Kevin Duffy @ 2005-01-24 17:14 UTC (permalink / raw)
To: pgsql-sql
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?
Remember be kind to the newbee.
Kevin Duffy
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Moving from Transact SQL to PL/pgSQL
2005-01-24 17:14 Moving from Transact SQL to PL/pgSQL Kevin Duffy <kevin07@parkerglobal.com>
@ 2005-01-25 19:19 ` Michael Fuhr <mike@fuhr.org>
2 siblings, 0 replies; 7+ messages in thread
From: Michael Fuhr @ 2005-01-25 19:19 UTC (permalink / raw)
To: Kevin Duffy <kevin07@parkerglobal.com>; +Cc: pgsql-sql
On Mon, Jan 24, 2005 at 12:14:22PM -0500, Kevin Duffy wrote:
> Where would I find documentation on PL/pgSQL, with examples?
On the PostgreSQL web site, or perhaps on your own server if you've
installed the documentation.
http://www.postgresql.org/
Follow the "Documentation" link, then follow the "Online Manuals"
link for whatever version of PostgreSQL you're running. The PL/pgSQL
documentation is under "Server Programming."
> How close to Oracle PL-SQL is Postgres? Would a Oracle PL-SQL book cover the basics?
The PL/pgSQL documentation has a "Porting from Oracle PL/SQL"
section.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Moving from Transact SQL to PL/pgSQL
2005-01-24 17:14 Moving from Transact SQL to PL/pgSQL Kevin Duffy <kevin07@parkerglobal.com>
@ 2005-01-25 20:19 ` Dennis Sacks <dennis@illusions.com>
2 siblings, 0 replies; 7+ messages in thread
From: Dennis Sacks @ 2005-01-25 20:19 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Moving from Transact SQL to PL/pgSQL
2005-01-24 17:14 Moving from Transact SQL to PL/pgSQL Kevin Duffy <kevin07@parkerglobal.com>
@ 2005-01-27 02:12 ` Clint Stotesbery <cstotes@hotmail.com>
2 siblings, 0 replies; 7+ messages in thread
From: Clint Stotesbery @ 2005-01-27 02:12 UTC (permalink / raw)
To: kevin07@parkerglobal.com; pgsql-sql
For Oracle info, check out one of my recent posts:
http://archives.postgresql.org/pgsql-sql/2005-01/msg00231.php
For TSQL, well, I was involved in project where we converted an Oracle db
(with procs, functions, triggers, etc) to PostgreSQL and MS Sql Server.
plpgsql and plsql are close enough where it isn't too hard to convert
between the two. TSQL and plpgsql are quite different.
-Clint
----Original Message Follows----
From: "Kevin Duffy" <kevin07@parkerglobal.com>
To: <pgsql-sql@postgresql.org>
Subject: [SQL] Moving from Transact SQL to PL/pgSQL
Date: Mon, 24 Jan 2005 12:14:22 -0500
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?
Remember be kind to the newbee.
Kevin Duffy
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Moving from Transact SQL to PL/pgsql
@ 2005-01-26 15:01 George Essig <george_essig@yahoo.com>
0 siblings, 0 replies; 7+ messages in thread
From: George Essig @ 2005-01-26 15:01 UTC (permalink / raw)
To: Duffy House <kevin07@optonline.net>; +Cc: pgsql-sql
> ...
> Where can I find
> primer on PL/pgsql, with lots of examples?
> ...
Download openacs at http://openacs.org/projects/openacs/download/. Look at directories matching
the pattern openacs-*/packages/*/sql/postgresql/. The older openacs version 4.6.3 has more
examples than openacs 5.
George Essig
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2005-01-27 02:12 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-24 03:22 Moving from Transact SQL to PL/pgsql Duffy House <kevin07@optonline.net>
2005-01-25 21:06 ` John DeSoi <desoi@pgedit.com>
2005-01-24 17:14 Moving from Transact SQL to PL/pgSQL Kevin Duffy <kevin07@parkerglobal.com>
2005-01-25 19:19 ` Re: Moving from Transact SQL to PL/pgSQL Michael Fuhr <mike@fuhr.org>
2005-01-25 20:19 ` Re: Moving from Transact SQL to PL/pgSQL Dennis Sacks <dennis@illusions.com>
2005-01-27 02:12 ` Re: Moving from Transact SQL to PL/pgSQL Clint Stotesbery <cstotes@hotmail.com>
2005-01-26 15:01 Re: Moving from Transact SQL to PL/pgsql George Essig <george_essig@yahoo.com>
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