i have code for MySQL but i need to PostgreSQL. Can you help me convert from MySQL to PostgreSQL?
Create TRIGGER date_reservation
BEFORE INSERT ON reservation
FOR EACH ROW
BEGIN
IF
NEW.date_reservation IS NULL OR NEW.date_reservation = ''
THEN
SET NEW.date_reservation = NOW();
END IF
END