Thread: Moving from Transact SQL to PL/pgsql

Moving from Transact SQL to PL/pgsql

From
Duffy House
Date:

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




Re: Moving from Transact SQL to PL/pgsql

From
John DeSoi
Date:
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



Re: Moving from Transact SQL to PL/pgsql

From
George Essig
Date:
> ...
>  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