Changeset 3164
- Timestamp:
- 08/05/08 15:42:02 (5 years ago)
- Location:
- DB/branches/leap-second-dev-branch/storedprocedures
- Files:
-
- 2 edited
-
truetime_pkg.sql (modified) (3 diffs)
-
wave_pkg.sql (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
DB/branches/leap-second-dev-branch/storedprocedures/truetime_pkg.sql
r3161 r3164 189 189 -- ***********************************************************************/ 190 190 FUNCTION utc2posix (utcDateStr VARCHAR2) RETURN VARCHAR2 DETERMINISTIC; 191 192 193 -- /*********************************************************************** 194 -- * Reinitialize the package after a LEAP_SECONDS table change. 195 -- ***********************************************************************/ 196 PROCEDURE init; 191 197 192 198 PRAGMA RESTRICT_REFERENCES (string2nominal, WNDS); … … 211 217 PRAGMA RESTRICT_REFERENCES (leaps2add, WNDS); 212 218 PRAGMA RESTRICT_REFERENCES (leaps2subtract, WNDS); 219 PRAGMA RESTRICT_REFERENCES (init, WNDS); 213 220 214 221 END TRUETIME; … … 780 787 -- Read data from Leap_Seconds table when package is 1st loaded into memory. 781 788 -- Doing this, rather than SELECT on the table in functions speeds up code ~3x. 782 783 BEGIN784 789 -- 785 SELECT s_nominal BULK COLLECT INTO nominalSecStart from LEAP_SECONDS; -- could do this instead of declaring cursor AWW 786 SELECT e_nominal BULK COLLECT INTO nominalSecEnd from LEAP_SECONDS; -- ditto above AWW 787 SELECT s_true BULK COLLECT INTO trueSecStart from LEAP_SECONDS; -- ditto above AWW 788 SELECT e_true BULK COLLECT INTO trueSecEnd from LEAP_SECONDS; -- ditto above AWW 789 SELECT ls_count BULK COLLECT INTO leapSecs from LEAP_SECONDS; -- ditto above AWW 790 SELECT base INTO v_pkg_base FROM EpochTimeBase WHERE offdate > SYS_EXTRACT_UTC(SYSTIMESTAMP); 790 PROCEDURE init AS 791 BEGIN 792 SELECT s_nominal BULK COLLECT INTO nominalSecStart from LEAP_SECONDS; -- could do this instead of declaring cursor AWW 793 SELECT e_nominal BULK COLLECT INTO nominalSecEnd from LEAP_SECONDS; -- ditto above AWW 794 SELECT s_true BULK COLLECT INTO trueSecStart from LEAP_SECONDS; -- ditto above AWW 795 SELECT e_true BULK COLLECT INTO trueSecEnd from LEAP_SECONDS; -- ditto above AWW 796 SELECT ls_count BULK COLLECT INTO leapSecs from LEAP_SECONDS; -- ditto above AWW 797 SELECT base INTO v_pkg_base FROM EpochTimeBase WHERE offdate > SYS_EXTRACT_UTC(SYSTIMESTAMP); 798 -- 799 --print_table_times; 800 -- 801 END init; 791 802 -- 792 -- Replaced below with above SQL -aww 793 --OPEN c1; 794 --FETCH c1 BULK COLLECT INTO nominalSecStart; 795 --CLOSE c1; 796 797 --OPEN c2; 798 --FETCH c2 BULK COLLECT INTO trueSecStart; 799 --CLOSE c2; 800 803 PROCEDURE print_table_times AS 804 BEGIN 805 -- 806 DBMS_OUTPUT.PUT_LINE('nomStart nomEnd trueStart trueEnd leapSecs'); 807 -- 808 FOR IDX IN 1..nominalSecStart.COUNT LOOP 809 DBMS_OUTPUT.PUT_LINE(nominalSecStart(idx) ||' '|| nominalSecEnd(idx) ||' '|| trueSecStart(idx) ||' '|| trueSecEnd(idx) ||' '|| leapSecs(idx)); 810 END LOOP; 811 -- 812 END print_table_times; 813 -- 814 BEGIN 815 -- 816 init; 817 -- 801 818 END TRUETIME; -- end of package 802 819 -
DB/branches/leap-second-dev-branch/storedprocedures/wave_pkg.sql
r3161 r3164 62 62 -- --------------------------------------------------------------------------------- 63 63 -- --------------------------------------------------------------------------------- 64 -- The database stored java is the UTC version 65 FUNCTION isJavaUTC() RETURN NUMBER; 66 -- 67 -- --------------------------------------------------------------------------------- 68 -- --------------------------------------------------------------------------------- 64 69 END wave; 65 70 … … 71 76 -- package variable refers to requested binary data 72 77 -- v_blob BLOB; 78 -- --------------------------------------------------------------------------------- 79 -- --------------------------------------------------------------------------------- 80 FUNCTION isJavaUTC() RETURN NUMBER 81 AS LANGUAGE JAVA NAME 'org.trinet.waveserver.dc.WaveformBLOB.isVersionUTC() return int'; 73 82 -- --------------------------------------------------------------------------------- 74 83 -- ---------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.
