wiki.techinc.nl/tests/phpunit/data/db/postgres/functions.sql
Max Semenik 6b7317c91f Added support for stored procedures/functions to MySQL:
* Refactored DatabaseBase::sourceStream(), made it possible for descendant classes to alter its behaviour w/o having to redo it completely like Oracle does.
* MySQL class now supports specifying DELIMITER.
* Thrown away the mess of catering for double semicolon. If it's a problem, fix your .sql files!
* Haven't actually touched Oracle.
* Tests!
2011-12-27 12:29:36 +00:00

12 lines
205 B
PL/PgSQL

-- Postgres test file for DatabaseTest::testStoredFunctions()
CREATE FUNCTION mw_test_function()
RETURNS INTEGER
LANGUAGE plpgsql AS
$mw$
DECLARE foo INTEGER;
BEGIN
foo := 21;
RETURN foo * 2;
END
$mw$;