Re: [GENERAL] Stored Procedures

Brett W. McCoy <bmccoy@lan2wan.com>

From: "Brett W. McCoy" <bmccoy@lan2wan.com>
To: Jeff MacDonald <jeff@hub.org>
Cc: pgsql-general@postgreSQL.org
Date: 1999-11-05T15:52:24Z
Lists: pgsql-general
On Fri, 5 Nov 1999, Jeff MacDonald wrote:

> 	1: does postgres support stored procedures

Yes, quite extensively, and far beyond what SQL 7 offers.  You may want 
to take a look at the programmer's manual for the documentation.

> 	2: say a user has a microsoft sql server 7 database
> 	with ~120 stored procedures, and alot of data, is their
> 	a script or tool to convert that to a postgres database
> 	or does it have to be done by hand.
> 

You can convert the data over with ODBC, but not the stored procedures. 
Under SQL 7, stored procedures are essentially SQL batch files and cannot
be used as a term in an expression, whereas under PostgreSQL, you can
create true functions in PL/PgSQL (a procedural language akin to
Oracle's), or as loadable executable modules written in C, C++, Tcl, etc.,
that returns values and objects, and can be used in an expression. 

I was shocked recently when we put in SQL 7 in our office (we've been 
using PostgreSQL for a while now, but we needed SQL 7 to use with a 
commercial retrieval system) and needed to start writing functions as I 
was used to under PostgreSQL, and couldn't.  A big win for PostgreSQL!

Brett W. McCoy           
                                         http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
There are people so addicted to exaggeration that they can't tell the
truth without lying.