def METHOD_NAME(pgcnx):
	print "-----------------------------"
	print "-- Creating SQL Functions on Base Types"
	print "--  a CREATE FUNCTION statement lets you create a new "
	print "--  function that can be used in expressions (in SELECT, "
	print "--  INSERT, etc.). We will start with functions that "
	print "--  return values of base types."
	print "-----------------------------"
	print
	print "--"
	print "-- let's create a simple SQL function that takes no arguments"
	print "-- and returns 1"
	print
	print "CREATE FUNCTION one() RETURNS int4"
	print "   AS 'SELECT 1 as ONE' LANGUAGE 'sql'"
	pgcnx.query("""CREATE FUNCTION one() RETURNS int4
        AS 'SELECT 1 as ONE' LANGUAGE 'sql'""")
	wait_key()
	print
	print "--"
	print "-- functions can be used in any expressions (eg. in the target"
	print "-- list or qualifications)"
	print
	print "SELECT one() AS answer"
	print pgcnx.query("SELECT one() AS answer")
	print
	print "--"
	print "-- here's how you create a function that takes arguments. The"
	print "-- following function returns the sum of its two arguments:"
	print
	print "CREATE FUNCTION add_em(int4, int4) RETURNS int4"
	print "   AS 'SELECT $1 + $2' LANGUAGE 'sql'"
	pgcnx.query("""CREATE FUNCTION add_em(int4, int4) RETURNS int4
        AS 'SELECT $1 + $2' LANGUAGE 'sql'""")
	print
	print "SELECT add_em(1, 2) AS answer"
	print pgcnx.query("SELECT add_em(1, 2) AS answer")