Commit 84d457ed authored by Peter Eisentraut's avatar Peter Eisentraut

Format PL/Python module contents test vertically

It makes it readable again and makes merges more manageable.
parent 4f714b2f
...@@ -36,17 +36,34 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or ...@@ -36,17 +36,34 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or
(3 rows) (3 rows)
-- check module contents -- check module contents
CREATE FUNCTION module_contents() RETURNS text AS CREATE FUNCTION module_contents() RETURNS SETOF text AS
$$ $$
contents = list(filter(lambda x: not x.startswith("__"), dir(plpy))) contents = list(filter(lambda x: not x.startswith("__"), dir(plpy)))
contents.sort() contents.sort()
return ", ".join(contents) return contents
$$ LANGUAGE plpythonu; $$ LANGUAGE plpythonu;
select module_contents(); select module_contents();
module_contents module_contents
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -----------------
Error, Fatal, SPIError, cursor, debug, error, execute, fatal, info, log, notice, prepare, quote_ident, quote_literal, quote_nullable, spiexceptions, subtransaction, warning Error
(1 row) Fatal
SPIError
cursor
debug
error
execute
fatal
info
log
notice
prepare
quote_ident
quote_literal
quote_nullable
spiexceptions
subtransaction
warning
(18 rows)
CREATE FUNCTION elog_test_basic() RETURNS void CREATE FUNCTION elog_test_basic() RETURNS void
AS $$ AS $$
......
...@@ -27,11 +27,11 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or ...@@ -27,11 +27,11 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or
-- check module contents -- check module contents
CREATE FUNCTION module_contents() RETURNS text AS CREATE FUNCTION module_contents() RETURNS SETOF text AS
$$ $$
contents = list(filter(lambda x: not x.startswith("__"), dir(plpy))) contents = list(filter(lambda x: not x.startswith("__"), dir(plpy)))
contents.sort() contents.sort()
return ", ".join(contents) return contents
$$ LANGUAGE plpythonu; $$ LANGUAGE plpythonu;
select module_contents(); select module_contents();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment