contrib/lo: Use SQL-standard function bodies
authorMichael Paquier <[email protected]>
Thu, 14 Nov 2024 04:23:11 +0000 (13:23 +0900)
committerMichael Paquier <[email protected]>
Thu, 14 Nov 2024 04:23:11 +0000 (13:23 +0900)
Author: Ronan Dunklau
Discussion: https://postgr.es/m/3316564.aeNJFYEL58@aivenlaptop

contrib/lo/Makefile
contrib/lo/lo--1.1--1.2.sql [new file with mode: 0644]
contrib/lo/lo.control
contrib/lo/meson.build

index 716893859eb51292edbb9a0e9ef1963787a390a2..8cfff63d882a29a93e5ddd3e72fdb939e131c780 100644 (file)
@@ -3,7 +3,7 @@
 MODULES = lo
 
 EXTENSION = lo
-DATA = lo--1.1.sql lo--1.0--1.1.sql
+DATA = lo--1.1.sql lo--1.0--1.1.sql lo--1.1--1.2.sql
 PGFILEDESC = "lo - management for large objects"
 
 REGRESS = lo
diff --git a/contrib/lo/lo--1.1--1.2.sql b/contrib/lo/lo--1.1--1.2.sql
new file mode 100644 (file)
index 0000000..a480923
--- /dev/null
@@ -0,0 +1,8 @@
+/* contrib/lo/lo--1.1--1.2.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION lo UPDATE TO '1.2'" to load this file. \quit
+
+CREATE OR REPLACE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid
+LANGUAGE SQL STRICT IMMUTABLE PARALLEL SAFE
+RETURN (SELECT $1::pg_catalog.oid);
index f73f8b5fae5e72789b4f4433089b95962eb13508..3acb3665a4e16f72bef84e5f6531a543963a5041 100644 (file)
@@ -1,6 +1,6 @@
 # lo extension
 comment = 'Large Object maintenance'
-default_version = '1.1'
+default_version = '1.2'
 module_pathname = '$libdir/lo'
 relocatable = true
 trusted = true
index 4cc72b64578cbfd62576c96800a9b31ae160cc96..1443a260b2774181a52c0ad2e8e8883f46491e11 100644 (file)
@@ -20,6 +20,7 @@ install_data(
   'lo.control',
   'lo--1.0--1.1.sql',
   'lo--1.1.sql',
+  'lo--1.1--1.2.sql',
   kwargs: contrib_data_args,
 )