mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Convert contrib modules to use the extension facility.
This isn't fully tested as yet, in particular I'm not sure that the "foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some buildfarm cycles on it. sepgsql is not converted to an extension, mainly because it seems to require a very nonstandard installation process. Dimitri Fontaine and Tom Lane
This commit is contained in:
1
contrib/pgstattuple/.gitignore
vendored
1
contrib/pgstattuple/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/pgstattuple.sql
|
@ -1,15 +1,10 @@
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# pgstattuple Makefile
|
||||
#
|
||||
# contrib/pgstattuple/Makefile
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
MODULE_big = pgstattuple
|
||||
OBJS = pgstattuple.o pgstatindex.o
|
||||
DATA_built = pgstattuple.sql
|
||||
DATA = uninstall_pgstattuple.sql
|
||||
|
||||
EXTENSION = pgstattuple
|
||||
DATA = pgstattuple--1.0.sql pgstattuple--unpackaged--1.0.sql
|
||||
|
||||
ifdef USE_PGXS
|
||||
PG_CONFIG = pg_config
|
||||
|
@ -1,7 +1,4 @@
|
||||
/* contrib/pgstattuple/pgstattuple.sql.in */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
/* contrib/pgstattuple/pgstattuple--1.0.sql */
|
||||
|
||||
CREATE OR REPLACE FUNCTION pgstattuple(IN relname text,
|
||||
OUT table_len BIGINT, -- physical table length in bytes
|
6
contrib/pgstattuple/pgstattuple--unpackaged--1.0.sql
Normal file
6
contrib/pgstattuple/pgstattuple--unpackaged--1.0.sql
Normal file
@ -0,0 +1,6 @@
|
||||
/* contrib/pgstattuple/pgstattuple--unpackaged--1.0.sql */
|
||||
|
||||
ALTER EXTENSION pgstattuple ADD function pgstattuple(text);
|
||||
ALTER EXTENSION pgstattuple ADD function pgstattuple(oid);
|
||||
ALTER EXTENSION pgstattuple ADD function pgstatindex(text);
|
||||
ALTER EXTENSION pgstattuple ADD function pg_relpages(text);
|
5
contrib/pgstattuple/pgstattuple.control
Normal file
5
contrib/pgstattuple/pgstattuple.control
Normal file
@ -0,0 +1,5 @@
|
||||
# pgstattuple extension
|
||||
comment = 'show tuple-level statistics'
|
||||
default_version = '1.0'
|
||||
module_pathname = '$libdir/pgstattuple'
|
||||
relocatable = true
|
@ -1,9 +0,0 @@
|
||||
/* contrib/pgstattuple/uninstall_pgstattuple.sql */
|
||||
|
||||
-- Adjust this setting to control where the objects get dropped.
|
||||
SET search_path = public;
|
||||
|
||||
DROP FUNCTION pgstattuple(text);
|
||||
DROP FUNCTION pgstattuple(oid);
|
||||
DROP FUNCTION pgstatindex(text);
|
||||
DROP FUNCTION pg_relpages(text);
|
Reference in New Issue
Block a user