diff options
| author | Bruce Momjian | 2007-11-11 03:25:35 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2007-11-11 03:25:35 +0000 |
| commit | 926bbab44832ae2763392077ecefa029d14c8544 (patch) | |
| tree | e70fd1806e8a04b019808e1c71428568eb900f8c /contrib/chkpass | |
| parent | 541ff409cc341ce1e0212fc6a7d67eef6709b6b4 (diff) | |
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.
Diffstat (limited to 'contrib/chkpass')
| -rw-r--r-- | contrib/chkpass/chkpass.sql.in | 25 | ||||
| -rw-r--r-- | contrib/chkpass/uninstall_chkpass.sql | 1 |
2 files changed, 8 insertions, 18 deletions
diff --git a/contrib/chkpass/chkpass.sql.in b/contrib/chkpass/chkpass.sql.in index 40a0d722c9..44e00fcf7f 100644 --- a/contrib/chkpass/chkpass.sql.in +++ b/contrib/chkpass/chkpass.sql.in @@ -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; diff --git a/contrib/chkpass/uninstall_chkpass.sql b/contrib/chkpass/uninstall_chkpass.sql index 34ad3fde8f..3f8cbb0c2c 100644 --- a/contrib/chkpass/uninstall_chkpass.sql +++ b/contrib/chkpass/uninstall_chkpass.sql @@ -1,3 +1,4 @@ +-- Adjust this setting to control where the objects get dropped. SET search_path = public; DROP OPERATOR <>(chkpass, text); |
