mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
From: Massimo Dal Zotto <dz@cs.unitn.it>
Here is a tar file the new directories, which substitute the old ones in contrib. Please remove the old directories array, datetime, miscutil, string and userlock before unpacking the tar file in contrib. Note that as the modules are now installed in lib/modules I install all my sql code in lib/sql. In my opinion also the other contributors should follow these rules.
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
-- datetime_functions.sql --
|
||||
--
|
||||
-- SQL code to define the new date and time functions and operators
|
||||
--
|
||||
-- Copyright (c) 1998, Massimo Dal Zotto <dz@cs.unitn.it>
|
||||
--
|
||||
-- This file is distributed under the GNU General Public License
|
||||
-- either version 2, or (at your option) any later version.
|
||||
|
||||
-- Define the new functions
|
||||
-- Define the new time functions.
|
||||
--
|
||||
create function hhmm_in(opaque) returns time
|
||||
as 'MODULE_PATHNAME'
|
||||
@ -58,16 +65,14 @@ create function currentdate() returns date
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
|
||||
-- Define a new operator - for time
|
||||
-- Define new operator - for time.
|
||||
--
|
||||
create operator - (
|
||||
leftarg=time,
|
||||
rightarg=time,
|
||||
procedure=time_difference);
|
||||
|
||||
|
||||
-- Define functions to switch from time to hhmm representation
|
||||
-- Define functions to switch from time to hhmm representation.
|
||||
--
|
||||
-- select hhmm_mode();
|
||||
-- select time_mode();
|
||||
@ -84,7 +89,6 @@ create function time_mode() returns text
|
||||
select ''time_mode''::text'
|
||||
language 'sql';
|
||||
|
||||
|
||||
-- Use these to do the updates manually
|
||||
--
|
||||
-- update pg_type set typinput ='hhmm_in' where typname='time';
|
||||
|
Reference in New Issue
Block a user