postgresql/contrib/chkpass/chkpass.sql.in
Tom Lane 591abe1b72 Remove bogus commutator marking --- the module doesn't actually supply
any commutator operator for =(chkpass,text), so this was creating a
shell operator that would fail on use.  Found by opr_sanity testing.
2007-09-29 23:32:42 +00:00

78 lines
1.3 KiB
MySQL

--
-- 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
--
--
-- 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)
RETURNS chkpass
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION chkpass_out(chkpass)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE TYPE chkpass (
internallength = 16,
externallength = 13,
input = chkpass_in,
output = chkpass_out
);
CREATE FUNCTION raw(chkpass)
RETURNS text
AS 'MODULE_PATHNAME', 'chkpass_rout'
LANGUAGE C STRICT;
--
-- The various boolean tests:
--
CREATE FUNCTION eq(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_eq'
LANGUAGE C STRICT;
CREATE FUNCTION ne(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_ne'
LANGUAGE C STRICT;
--
-- Now the operators.
--
CREATE OPERATOR = (
leftarg = chkpass,
rightarg = text,
negator = <>,
procedure = eq
);
CREATE OPERATOR <> (
leftarg = chkpass,
rightarg = text,
negator = =,
procedure = ne
);
COMMENT ON TYPE chkpass IS 'password type with checks';
--
-- eof
--