CREATE OR REPLACE FUNCTION _time_to_integer(time with time zone)
RETURNS integer AS $$
SELECT
EXTRACT(HOUR FROM $1)::integer * 10000
+ EXTRACT(MINUTE FROM $1)::integer * 100
+ EXTRACT(SECONDS FROM $1)::integer
$$ IMMUTABLE STRICT LANGUAGE SQL;


DROP CAST IF EXISTS (time with time zone AS integer);


CREATE CAST (time with time zone AS integer)
WITH FUNCTION _time_to_integer (time with time zone)
AS IMPLICIT;

相关文章:

  • 2021-01-22
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-26
猜你喜欢
  • 2021-10-22
  • 2022-12-23
  • 2021-12-16
  • 2021-11-13
  • 2021-12-02
  • 2021-07-14
  • 2022-12-23
相关资源
相似解决方案