]>
git.saurik.com Git - timeuuid.git/blob - timeuuid--1.0.sql
1 \echo Use
"CREATE EXTENSION timeuuid" to load this
file. \quit
5 create or replace function timeuuid_in(cstring
) returns timeuuid
6 as 'uuid_in' language internal
immutable strict;
7 create or replace function timeuuid_out(timeuuid
) returns cstring
8 as 'uuid_out' language internal
immutable strict;
10 create or replace function timeuuid_recv(internal
) returns timeuuid
11 as 'uuid_recv' language internal
immutable strict;
12 create or replace function timeuuid_send(timeuuid
) returns bytea
13 as 'uuid_send' language internal
immutable strict;
15 create type timeuuid (
17 output = timeuuid_out
,
18 receive
= timeuuid_recv
,
23 create or replace function timeuuid_eq(timeuuid
, timeuuid
) returns boolean
24 as 'uuid_eq' language internal
immutable strict;
25 create or replace function timeuuid_neq(timeuuid
, timeuuid
) returns boolean
26 as 'uuid_ne' language internal
immutable strict;
28 create or replace function timeuuid_hash(timeuuid
) returns int4
29 as 'uuid_hash' language internal
immutable strict;
31 create function timeuuid_lt(timeuuid
, timeuuid
) returns boolean
32 as 'MODULE_PATHNAME' language c
strict immutable;
33 create function timeuuid_gt(timeuuid
, timeuuid
) returns boolean
34 as 'MODULE_PATHNAME' language c
strict immutable;
35 create function timeuuid_le(timeuuid
, timeuuid
) returns boolean
36 as 'MODULE_PATHNAME' language c
strict immutable;
37 create function timeuuid_ge(timeuuid
, timeuuid
) returns boolean
38 as 'MODULE_PATHNAME' language c
strict immutable;
40 create function timeuuid_cmp(timeuuid
, timeuuid
) returns int4
41 as 'MODULE_PATHNAME' language c
strict immutable;
48 procedure = timeuuid_eq
,
60 procedure = timeuuid_neq
,
70 procedure = timeuuid_lt
,
71 restrict = scalarltsel
,
72 join = scalarltjoinsel
80 procedure = timeuuid_gt
,
81 restrict = scalargtsel
,
82 join = scalargtjoinsel
90 procedure = timeuuid_le
,
91 restrict = scalarltsel
,
92 join = scalarltjoinsel
100 procedure = timeuuid_ge
,
101 restrict = scalargtsel
,
102 join = scalargtjoinsel
105 create operator class timeuuid_ops
106 default for type timeuuid
using btree
as
112 function 1 timeuuid_cmp(timeuuid
, timeuuid
);
114 create cast (timeuuid
as uuid
)
115 without function as assignment;
116 create cast (uuid
as timeuuid
)
117 without function as assignment;
119 create function timeuuid_to_timestamptz(uuid
) returns timestamptz
120 as 'MODULE_PATHNAME' language c
strict immutable;
121 create function timeuuid_to_timestamptz(timeuuid
) returns timestamptz
122 as 'MODULE_PATHNAME' language c
strict immutable;
123 create function timestamptz_to_timeuuid(timestamptz
) returns timeuuid
124 as 'MODULE_PATHNAME' language c
strict immutable;
126 create cast (timeuuid
as timestamptz
)
127 with function timeuuid_to_timestamptz(timeuuid
);
128 create cast (timestamptz
as timeuuid
)
129 with function timestamptz_to_timeuuid(timestamptz
);