Stored procs: PL/Tcl only? Settable privs for them? - Mailing list pgsql-general

From Randall Parker
Subject Stored procs: PL/Tcl only? Settable privs for them?
Date
Msg-id 17301066487966@mail.nls.net
Whole thread Raw
Responses Re: Stored procs: PL/Tcl only? Settable privs for them?
List 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?





pgsql-general by date:

Previous
From: Bruce Guenter
Date:
Subject: Benchmarks?
Next
From: kumar1@home.com (Prasanth A. Kumar)
Date:
Subject: Re: Slashdot discussion