pgsql: Fix erroneous handling of shared dependencies (ie dependencies on

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix erroneous handling of shared dependencies (ie dependencies on
Date: 2009-10-02 18:13:04
Message-ID: 20091002181304.987A8753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix erroneous handling of shared dependencies (ie dependencies on roles)
in CREATE OR REPLACE FUNCTION. The original code would update pg_shdepend
as if a new function was being created, even if it wasn't, with two bad
consequences: pg_shdepend might record the wrong owner for the function,
and any dependencies for roles mentioned in the function's ACL would be lost.
The fix is very easy: just don't touch pg_shdepend at all when doing a
function replacement.

Also update the CREATE FUNCTION reference page, which never explained
exactly what changes and doesn't change in a function replacement.
In passing, fix the CREATE VIEW reference page similarly; there's no
code bug there, but the docs didn't say what happens.

Modified Files:
--------------
pgsql/doc/src/sgml/ref:
create_function.sgml (r1.86 -> r1.87)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_function.sgml?r1=1.86&r2=1.87)
create_view.sgml (r1.41 -> r1.42)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_view.sgml?r1=1.41&r2=1.42)
pgsql/src/backend/catalog:
pg_proc.c (r1.165 -> r1.166)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_proc.c?r1=1.165&r2=1.166)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-10-02 18:13:10 pgsql: Fix erroneous handling of shared dependencies (ie dependencies on
Previous Message Alvaro Herrera 2009-10-02 17:58:21 pgsql: Ensure that a cursor has an immutable snapshot throughout its