From e7880e5d39d098d40717d23c9162b8e52294792a Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 7 Jun 2016 11:26:01 -0400 Subject: Update lo extension for parallel query. The lo_oid function provided by this extension is PARALLEL SAFE. Andreas Karlsson --- contrib/lo/Makefile | 2 +- contrib/lo/lo--1.0--1.1.sql | 6 ++++++ contrib/lo/lo--1.0.sql | 25 ------------------------- contrib/lo/lo--1.1.sql | 25 +++++++++++++++++++++++++ contrib/lo/lo.control | 2 +- 5 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 contrib/lo/lo--1.0--1.1.sql delete mode 100644 contrib/lo/lo--1.0.sql create mode 100644 contrib/lo/lo--1.1.sql diff --git a/contrib/lo/Makefile b/contrib/lo/Makefile index b956aa4fa12..71f0cb0d249 100644 --- a/contrib/lo/Makefile +++ b/contrib/lo/Makefile @@ -3,7 +3,7 @@ MODULES = lo EXTENSION = lo -DATA = lo--1.0.sql lo--unpackaged--1.0.sql +DATA = lo--1.1.sql lo--1.0--1.1.sql lo--unpackaged--1.0.sql PGFILEDESC = "lo - management for large objects" ifdef USE_PGXS diff --git a/contrib/lo/lo--1.0--1.1.sql b/contrib/lo/lo--1.0--1.1.sql new file mode 100644 index 00000000000..10a4ea29371 --- /dev/null +++ b/contrib/lo/lo--1.0--1.1.sql @@ -0,0 +1,6 @@ +/* contrib/lo/lo--1.0--1.1.sql */ + +-- complain if script is sourced in psql, rather than via ALTER EXTENSION +\echo Use "ALTER EXTENSION lo UPDATE TO '1.1'" to load this file. \quit + +ALTER FUNCTION lo_oid(lo) PARALLEL SAFE; diff --git a/contrib/lo/lo--1.0.sql b/contrib/lo/lo--1.0.sql deleted file mode 100644 index cb350e0b8a0..00000000000 --- a/contrib/lo/lo--1.0.sql +++ /dev/null @@ -1,25 +0,0 @@ -/* contrib/lo/lo--1.0.sql */ - --- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "CREATE EXTENSION lo" to load this file. \quit - --- --- Create the data type ... now just a domain over OID --- - -CREATE DOMAIN lo AS pg_catalog.oid; - --- --- For backwards compatibility, define a function named lo_oid. --- --- The other functions that formerly existed are not needed because --- the implicit casts between a domain and its underlying type handle them. --- -CREATE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS -'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT IMMUTABLE; - --- This is used in triggers -CREATE FUNCTION lo_manage() -RETURNS pg_catalog.trigger -AS 'MODULE_PATHNAME' -LANGUAGE C; diff --git a/contrib/lo/lo--1.1.sql b/contrib/lo/lo--1.1.sql new file mode 100644 index 00000000000..c817cb484f2 --- /dev/null +++ b/contrib/lo/lo--1.1.sql @@ -0,0 +1,25 @@ +/* contrib/lo/lo--1.1.sql */ + +-- complain if script is sourced in psql, rather than via CREATE EXTENSION +\echo Use "CREATE EXTENSION lo" to load this file. \quit + +-- +-- Create the data type ... now just a domain over OID +-- + +CREATE DOMAIN lo AS pg_catalog.oid; + +-- +-- For backwards compatibility, define a function named lo_oid. +-- +-- The other functions that formerly existed are not needed because +-- the implicit casts between a domain and its underlying type handle them. +-- +CREATE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS +'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT IMMUTABLE PARALLEL SAFE; + +-- This is used in triggers +CREATE FUNCTION lo_manage() +RETURNS pg_catalog.trigger +AS 'MODULE_PATHNAME' +LANGUAGE C; diff --git a/contrib/lo/lo.control b/contrib/lo/lo.control index 849dfb58039..820326c7989 100644 --- a/contrib/lo/lo.control +++ b/contrib/lo/lo.control @@ -1,5 +1,5 @@ # lo extension comment = 'Large Object maintenance' -default_version = '1.0' +default_version = '1.1' module_pathname = '$libdir/lo' relocatable = true -- cgit v1.2.3