mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Make /contrib install/uninstall script consistent:
remove transactions use create or replace function make formatting consistent set search patch on first line Add documentation on modifying *.sql to set the search patch, and mention that major upgrades should still run the installation scripts. Some of these issues were spotted by Tom today.
This commit is contained in:
@ -1,9 +1,3 @@
|
||||
--
|
||||
-- PostgreSQL code for managed Large Objects
|
||||
--
|
||||
-- $PostgreSQL: pgsql/contrib/lo/lo.sql.in,v 1.13 2005/06/23 00:06:37 tgl Exp $
|
||||
--
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
@ -19,11 +13,11 @@ CREATE DOMAIN lo AS pg_catalog.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
|
||||
CREATE OR REPLACE 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()
|
||||
CREATE OR REPLACE FUNCTION lo_manage()
|
||||
RETURNS pg_catalog.trigger
|
||||
AS 'MODULE_PATHNAME'
|
||||
LANGUAGE C;
|
||||
|
@ -1,3 +1,6 @@
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
--
|
||||
-- This runs some common tests against the type
|
||||
--
|
||||
|
@ -1,11 +1,11 @@
|
||||
-- Adjust this setting to control where the objects get dropped.
|
||||
SET search_path = public;
|
||||
|
||||
--
|
||||
-- This removes the LO type
|
||||
-- It's used just for development
|
||||
--
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
-- drop the type and associated functions
|
||||
DROP TYPE lo CASCADE;
|
||||
|
||||
|
Reference in New Issue
Block a user