Commit e8902f00 authored by Bruce Momjian's avatar Bruce Momjian

Group ISBN/ISSN definitions.

parent f9ebf369
-- --
-- PostgreSQL code for ISSNs. -- PostgreSQL code for ISSNs.
-- --
-- $Id: isbn_issn.sql.in,v 1.8 2003/05/14 03:25:56 tgl Exp $ -- $Id: isbn_issn.sql.in,v 1.9 2003/06/28 00:36:40 momjian Exp $
-- --
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
...@@ -116,14 +116,30 @@ CREATE OPERATOR <> ( ...@@ -116,14 +116,30 @@ CREATE OPERATOR <> (
PROCEDURE = issn_ne PROCEDURE = issn_ne
); );
-- Register 'issn' comparison function
CREATE FUNCTION issn_cmp(issn, issn)
RETURNS integer
AS '$libdir/isbn_issn'
LANGUAGE c;
-- Create default operator class for 'issn' --
-- Needed to create index or primary key --
CREATE OPERATOR CLASS issn_ops
DEFAULT FOR TYPE issn USING btree
AS
OPERATOR 1 < ,
OPERATOR 2 <= ,
OPERATOR 3 = ,
OPERATOR 4 >= ,
OPERATOR 5 > ,
FUNCTION 1 issn_cmp(issn, issn);
------------------------------------------------------------------------
-- --
-- eof -- Same code for ISBN
--
--
-- PostgreSQL code for ISBNs.
--
-- $Id: isbn_issn.sql.in,v 1.8 2003/05/14 03:25:56 tgl Exp $
--
-- --
-- Input and output functions and the type itself: -- Input and output functions and the type itself:
-- --
...@@ -239,16 +255,8 @@ RETURNS integer ...@@ -239,16 +255,8 @@ RETURNS integer
AS '$libdir/isbn_issn' AS '$libdir/isbn_issn'
LANGUAGE c; LANGUAGE c;
-- Register 'issn' comparison function
CREATE FUNCTION issn_cmp(issn, issn)
RETURNS integer
AS '$libdir/isbn_issn'
LANGUAGE c;
-------------------------------------------------
-- Create default operator class for 'isbn' -- -- Create default operator class for 'isbn' --
-- Needed to create index or primary key -- -- Needed to create index or primary key --
-------------------------------------------------
CREATE OPERATOR CLASS isbn_ops CREATE OPERATOR CLASS isbn_ops
DEFAULT FOR TYPE isbn USING btree DEFAULT FOR TYPE isbn USING btree
...@@ -259,23 +267,3 @@ AS ...@@ -259,23 +267,3 @@ AS
OPERATOR 4 >= , OPERATOR 4 >= ,
OPERATOR 5 > , OPERATOR 5 > ,
FUNCTION 1 isbn_cmp(isbn, isbn); FUNCTION 1 isbn_cmp(isbn, isbn);
-------------------------------------------------
-- Create default operator class for 'issn' --
-- Needed to create index or primary key --
-------------------------------------------------
CREATE OPERATOR CLASS issn_ops
DEFAULT FOR TYPE issn USING btree
AS
OPERATOR 1 < ,
OPERATOR 2 <= ,
OPERATOR 3 = ,
OPERATOR 4 >= ,
OPERATOR 5 > ,
FUNCTION 1 issn_cmp(issn, issn);
--
-- eof
--
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment