BEGIN;
CREATE SCHEMA __python__;
SET search_path = __python__;
CREATE FUNCTION
 "handler"()
RETURNS LANGUAGE_HANDLER LANGUAGE C AS 'python', 'pl_handler';
CREATE FUNCTION
 "validator"(oid)
RETURNS VOID LANGUAGE C AS 'python', 'pl_validator';
COMMIT;
BEGIN;
SET search_path = __python__;
-- It's okay if this fails on versions before 9.0.
CREATE FUNCTION
 "inline"(INTERNAL)
RETURNS VOID LANGUAGE C AS 'python', 'pl_inline';
ERROR:  could not find function "pl_inline" in file "/src/build/pg83/lib/postgresql/python.so"
CREATE LANGUAGE python HANDLER "handler" INLINE "inline" VALIDATOR "validator";
ERROR:  syntax error at or near "INLINE"
LINE 1: CREATE LANGUAGE python HANDLER "handler" INLINE "inline" VAL...
                                                 ^
COMMIT;
BEGIN;
-- This should not fail if the one above does.
CREATE LANGUAGE python HANDLER "handler" VALIDATOR "validator";
COMMIT;
-- Finish with an explicit check.
BEGIN;
CREATE OR REPLACE FUNCTION test_python() RETURNS text LANGUAGE 'python' AS
$$
import Postgres
import sys
def main():
	return "python language installed successfully"
$$;
SELECT test_python();
              test_python               
----------------------------------------
 python language installed successfully
(1 row)

-- Don't want these changes.
ABORT;
