Stored procs: PL/Tcl only? Settable privs for them?

From: "Randall Parker" <randall(at)nls(dot)net>
To: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Stored procs: PL/Tcl only? Settable privs for them?
Date: 2000-07-11 17:32:16
Message-ID: 17301066487966@mail.nls.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to figure out how to do in Postgres what I already pretty well understand in
DB2: Create a stored procedure that accepts a couple of arguments, does a look-up
in a table using those args in a where clause, and then return a boolean result of
whether a matching row was found. Or potentially return a row.

I have a few questions:

1) Is PL/Tcl the only way to do stored procedures?

2) Is CREATE FUNCTION pretty much a logical equivalent to CREATE
PROCEDURE in other RDBMSs?
Is it considered part of the SQL command set to Postgres?

3) Am I right in guessing that it would be a very big job to support Java under
CREATE LANGUAGE?

4) How about granting rights to stored procedures?
In DB2 one can grant privileges to what are called packages. Well, a stored proc
is like a package. One can grant privileges to a stored proc to have access to a
table or view and what it can do on that table and view.
Then in DB2 one can grant access for a group or user to invoke a stored proc.
I don't see where the Postgres GRANT can do that:
http://postgresql.nextpath.com/docs/user/sql-grant.htm

A) So is there a way to assign access privileges to a stored proc (ie function) that
are independent of the user who is calling it?
B) And can one do grants on which users can actually call a particular function?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Randall Parker 2000-07-11 17:38:48 JDBC invoke of Postgres stored procs?
Previous Message Prasanth A. Kumar 2000-07-11 17:31:40 Re: Slashdot discussion