So I am trying to create a postgresql function (postgres 8.1) to do the following:
CREATE FUNCTION mailme(text) RETURNS integer AS'
#!/bin/sh
/root/mailme.sh $1
' LANGUAGE plsh;
(I don't really care about the return of this, just want it to execute the shell script.)
CREATE TRIGGER updatemailme
AFTER INSERT OR UPDATE OR DELETE
ON records FOR EACH ROW
EXECUTE PROCEDURE mailme(name);
(name is a field in the records table of my database that I want as $1)
Anyone know if this would work or how I would go about doing this?
Thanks,
Dennis
CREATE FUNCTION mailme(text) RETURNS integer AS'
#!/bin/sh
/root/mailme.sh $1
' LANGUAGE plsh;
(I don't really care about the return of this, just want it to execute the shell script.)
CREATE TRIGGER updatemailme
AFTER INSERT OR UPDATE OR DELETE
ON records FOR EACH ROW
EXECUTE PROCEDURE mailme(name);
(name is a field in the records table of my database that I want as $1)
Anyone know if this would work or how I would go about doing this?
Thanks,
Dennis