Skip to content

Commit b7c6520

Browse files
[skip ci]
[skip ci]
1 parent bac3918 commit b7c6520

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

pg-identity-func-trig-seq.sql

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,16 @@ pguserval := (SELECT current_user);
110110
when
111111
column_name = 'modify_date' then
112112
column_value := (select to_char (column_value::timestamp, 'YYYY-MM-DD HH24:MI:SS.MS'));
113-
-- when
114-
-- column_name = 'achievement_date' then
115-
--column_value := (select to_date (column_value, 'MM/DD/YYYY'));
116-
--column_value := (select to_date (column_value));
117-
--when
118-
--column_name = 'password' then
119-
--column_value := regexp_replace(column_value, '\s', '', 'g');
120-
--column_value := regexp_replace(column_value, E'[\\n\\r]+', '\n\r', 'g');
121-
else
113+
when
114+
column_name = 'last_login' then
115+
column_value := (select to_char (column_value::timestamp, 'YYYY-MM-DD HH24:MI:SS.MS'));
116+
when
117+
column_name = 'last_site_hit_date' then
118+
column_value := (select to_char (column_value::timestamp, 'YYYY-MM-DD HH24:MI:SS.MS'));
119+
when
120+
column_name = 'corona_event_timestamp' then
121+
column_value := (select to_char (column_value::timestamp, 'YYYY-MM-DD HH24:MI:SS.MS'));
122+
else
122123
-- RAISE NOTICE ' not boolean';
123124
end case;
124125
payload_items := array_append(payload_items, '"' || replace(column_name, '"', '\"') || '":"' || replace(column_value, '"', '\"') || '"');
@@ -271,6 +272,8 @@ BEGIN
271272
RETURN NEW;
272273
END;
273274
$body$ LANGUAGE plpgsql
275+
276+
ALTER SEQUENCE corona_event_corona_event_id_seq RESTART WITH 77770000;
274277

275278
CREATE SEQUENCE payloadsequence INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807
276279
START WITH 1 NO CYCLE;

0 commit comments

Comments
 (0)