Re: Ridicolus Postgresql review

Поиск
Список
Период
Сортировка
От A_Schnabel@t-online.de (Andre Schnabel)
Тема Re: Ridicolus Postgresql review
Дата
Msg-id 012d01c13b03$2302a0c0$0201a8c0@aschnabel.homeip.net
обсуждение исходный текст
Ответ на Re: Ridicolus Postgresql review  (Shaun Thomas <sthomas@townnews.com>)
Список pgsql-general
----- Original Message -----
From: "Mitch Vincent" <mvincent@cablespeed.com>
Subject: Re: [GENERAL] Ridicolus Postgresql review


> It seems that the argument is over what a "stored procedure" is.... So can
> anyone answer that with something to back it up? Opinions are great and
all
> but I think something more substantial than the "just 'cause" reason is
> needed here :-)
>
> Thanks!
>
> -Mitch
>

So .. I'll give it a try.

I'll leave the discussion to you. (Because PostgreSQL does actually support,
what I think, a stored procedure should be)

This is, what Oracle says on stored procedures
(in Oracle8i Application Developer's Guide - Fundamentals Release 8.1.5)
##################################################################
Stored Program Units (Procedures, Functions, and Packages)
A stored procedure, function, or package is a PL/SQL program unit that has
the following features:

- Has a name.
- Can take parameters, and can return values.
- Is stored in the data dictionary.
- Can be called by many users.
----------------------------------------------------------------------------
----
Note:
The term stored procedure is sometimes used generically to cover both stored
procedures and stored functions. The only difference between procedures and
functions is that functions always return a single value to the caller,
while procedures do not return a value to the caller.
----------------------------------------------------------------------------
----

##################################################################

So a stored procedure in Oracle can return values. I can't see, if this
implies, that a set of results can be returned.


Here is, what IBM (DB2) says about stored procedures
(from stored procedures information site ... found on www)

##################################################################
First, in a nutshell, what is a stored procedure?

A stored procedure is an application program that is executed by DB2 for
OS/390 in response to a single SQL CALL statement.  It can contain SQL
statements, as well as any application or business logic.  A stored
procedure can be written in one of  many high level languages, such as C,
C++, COBOL, PL/I, S/390 Assembler, and with recent maintenance,  in REXX,
procedural SQL ,and soon in Java.    Support for invoking a stored procedure
and processing its result sets  is built into many client applications, and
also into  ODBC, JDBC and  SQLJ standards.

##################################################################

IBM clearly claims, that a stored procedure (in DB2) can return result sets.


Now let's have a look at MS SQL-Server
(from the MS-Website, MSDN Home >  MSDN Library >  Microsoft SQL Server >
Stored Procedures)
##################################################################

Stored procedures in SQL Server are similar to procedures in other
programming languages in that they can:

- Accept input parameters and return multiple values in the form of output
parameters to the calling procedure or batch.

- Contain programming statements that perform operations in the database,
including calling other procedures.

- Return a status value to a calling procedure or batch to indicate success
or failure (and the reason for failure).

You can use the Transact-SQL EXECUTE statement to run a stored procedure.
Stored procedures are different from functions in that they do not return
values in place of their names and they cannot be used directly in an
expression.
##################################################################

From this definition I can't see, if a stored procedure can return a result
set.


And last (maybe least) the definition of stored procedures at
webopedia.internet.com (I know .. I'll be flamed for posting that ;-):

##################################################################
In database management systems (DBMSs), an operation that is stored with the
database server. Typically, stored procedures are written in SQL. They're
especially important for client-server database systems because storing the
procedure on the server side means that it is available to all clients. And
when the procedure is modified, all clients automatically get the new
version.
##################################################################

There is no word on returning values at all.


В списке pgsql-general по дате отправления:

Предыдущее
От: Bradley McLean
Дата:
Сообщение: Re: Installation location of Perl and Python modules
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: Re: Installation location of Perl and Python modules