Home > database >  Postgresql create a trigger, formatted input time
Postgresql create a trigger, formatted input time

Time:09-27

This is one of my custom function and trigger
The CREATE OR REPLACE FUNCTION format_time () RETURNS the TRIGGER AS $$
The BEGIN
NEW pass_time=to_timestamp (NEW pass_time, 'MM - dd yyyy - HH: MM: ss ");
RETURN NULL;
The END;
$$LANGUAGE PLPGSQL;
The CREATE OR REPLACE the TRIGGER format_pass_time BEFORE INSERT ON checkpoint_back2
FOR EACH ROW EXECUTE PROCEDURE format_time ();
To insert but I will still be error occurs when the

Under the great god please help see

CodePudding user response:

To_timestamp (NEW pass_time, 'MM - dd yyyy - HH: MM: ss')
HH: mm: ss pay attention to is the mi, not mm
  • Related