postgresql/src/include/utils
Tom Lane 8d3b421f5f Allow non-superusers to create (some) extensions.
Remove the unconditional superuser permissions check in CREATE EXTENSION,
and instead define a "superuser" extension property, which when false
(not the default) skips the superuser permissions check.  In this case
the calling user only needs enough permissions to execute the commands
in the extension's installation script.  The superuser property is also
enforced in the same way for ALTER EXTENSION UPDATE cases.

In other ALTER EXTENSION cases and DROP EXTENSION, test ownership of
the extension rather than superuserness.  ALTER EXTENSION ADD/DROP needs
to insist on ownership of the target object as well; to do that without
duplicating code, refactor comment.c's big switch for permissions checks
into a separate function in objectaddress.c.

I also removed the superuserness checks in pg_available_extensions and
related functions; there's no strong reason why everybody shouldn't
be able to see that info.

Also invent an IF NOT EXISTS variant of CREATE EXTENSION, and use that
in pg_dump, so that dumps won't fail for installed-by-default extensions.
We don't have any of those yet, but we will soon.

This is all per discussion of wrapping the standard procedural languages
into extensions.  I'll make those changes in a separate commit; this is
just putting the core infrastructure in place.
2011-03-04 16:08:53 -05:00
..
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
acl.h Allow non-superusers to create (some) extensions. 2011-03-04 16:08:53 -05:00
array.h Add FOREACH IN ARRAY looping to plpgsql. 2011-02-16 01:53:03 -05:00
ascii.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
attoptcache.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
builtins.h Add PL/Python functions for quoting strings 2011-02-22 23:41:23 +02:00
bytea.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
cash.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
catcache.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
combocid.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
date.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
datetime.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
datum.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
dynahash.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
dynamic_loader.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
elog.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
fmgrtab.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
formatting.h Per-column collation support 2011-02-08 23:04:18 +02:00
geo_decls.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
guc.h Code cleanup for assign_XactIsoLevel. 2011-01-21 21:49:19 -05:00
guc_tables.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
help_config.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
hsearch.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
inet.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
int8.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
inval.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
logtape.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
lsyscache.h Per-column collation support 2011-02-08 23:04:18 +02:00
memutils.h Fix obsolete comment. 2011-02-15 13:27:54 -05:00
nabstime.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
numeric.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
palloc.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
pg_crc.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
pg_locale.h Per-column collation support 2011-02-08 23:04:18 +02:00
pg_lzcompress.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pg_rusage.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
plancache.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
portal.h Run a portal's cleanup hook immediately when pushing it to DONE state. 2011-03-03 13:04:06 -05:00
ps_status.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
rbtree.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
rel.h Per-column collation support 2011-02-08 23:04:18 +02:00
relcache.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
relmapper.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
resowner.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
selfuncs.h Per-column collation support 2011-02-08 23:04:18 +02:00
snapmgr.h Rearrange snapshot handling to make rule expansion more consistent. 2011-02-28 23:28:06 -05:00
snapshot.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
spccache.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
syscache.h Per-column collation support 2011-02-08 23:04:18 +02:00
timestamp.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
tqual.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
tuplesort.h Per-column collation support 2011-02-08 23:04:18 +02:00
tuplestore.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
typcache.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
tzparser.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
uuid.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
varbit.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
xml.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00