1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +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:
Bruce Momjian
2007-11-11 03:25:35 +00:00
parent 541ff409cc
commit 926bbab448
54 changed files with 1056 additions and 1025 deletions

View File

@ -1,27 +1,16 @@
--
-- PostgreSQL code for CHKPASS.
-- Written by D'Arcy J.M. Cain
-- darcy@druid.net
-- http://www.druid.net/darcy/
--
-- $PostgreSQL: pgsql/contrib/chkpass/chkpass.sql.in,v 1.7 2007/09/29 23:32:42 tgl Exp $
--
-- best viewed with tabs set to 4
--
-- Adjust this setting to control where the objects get created.
SET search_path = public;
--
-- Input and output functions and the type itself:
--
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE FUNCTION chkpass_in(cstring)
CREATE OR REPLACE FUNCTION chkpass_in(cstring)
RETURNS chkpass
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION chkpass_out(chkpass)
CREATE OR REPLACE FUNCTION chkpass_out(chkpass)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -33,7 +22,7 @@ CREATE TYPE chkpass (
output = chkpass_out
);
CREATE FUNCTION raw(chkpass)
CREATE OR REPLACE FUNCTION raw(chkpass)
RETURNS text
AS 'MODULE_PATHNAME', 'chkpass_rout'
LANGUAGE C STRICT;
@ -42,12 +31,12 @@ CREATE FUNCTION raw(chkpass)
-- The various boolean tests:
--
CREATE FUNCTION eq(chkpass, text)
CREATE OR REPLACE FUNCTION eq(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_eq'
LANGUAGE C STRICT;
CREATE FUNCTION ne(chkpass, text)
CREATE OR REPLACE FUNCTION ne(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_ne'
LANGUAGE C STRICT;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR <>(chkpass, text);