System: Redhat 5.1
Linux Kernel: 2.0.34 
PostgreSQL: version 6.3 (rpm)

Problem executing trigger:
ERROR: stat failed on file/usr/local/pgsql/lib/plpgsql.so

I am missing the 'plpgsql.so' file. Would somebody be kind enough to 
send me one of the following three:

1.-  A copy of the 'so' file.
2.-  The source files needed to generate the above file. 
3.-  A URL site where I could download the software. 

These are the step that I took to create and execute the trigger:
-----------------------------------------------------------------
Step I

$ psql -e mifm_master < Fh_create.txt

CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
                '/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';
QUERY: CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
                '/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';
CREATE
EOF
---------------------------------------------------------------------------
Step II

$ psql -e mifm_master < Ft_plpgsql.txt

CREATE FUNCTION check_foreign_key () RETURNS OPAQUE AS '
        BEGIN
                -- Check foreign key
                SELECT * FROM menus WHERE menus.menu_name = NEW.menu_name;

                IF NOT FOUND THEN
                        RAISE EXCEPTION "menu name not found",new.menu_name;
                END IF;
        EBD;
' LANGUAGE 'plpgsql';
CREATE

CREATE TRIGGER if_menu_name_exists
BEFORE INSERT OR UPDATE ON superusr FOR EACH ROW
EXECUTE PROCEDURE check_foreign_key ();
QUERY: CREATE TRIGGER if_menu_name_exists
BEFORE INSERT OR UPDATE ON superusr FOR EACH ROW
EXECUTE PROCEDURE check_foreign_key ();
CREATE
EOF
---------------------------------------------------------------------
Step III

$ psql -e mifm_master < Tbl_insert.txt

QUERY: INSERT INTO superusr (login_key, login_name, login_password,
                           multy_user_flag, heading_title, menu_name)
VALUES ('A', 'ELOY', 'f(u)', 'Y', 'Master of the Universe', 'master');
ERROR:  stat failed on file /usr/local/pgsql/lib/plpgsql.so
EOF

Thanks for kindly help

Miguel R. Valero
[EMAIL PROTECTED]


Reply via email to