wrong trigger for pgsql