Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84d457e

Browse files
committed
Format PL/Python module contents test vertically
It makes it readable again and makes merges more manageable.
1 parent4f714b2 commit84d457e

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

‎src/pl/plpython/expected/plpython_test.out

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,34 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or
3636
(3 rows)
3737

3838
-- check module contents
39-
CREATE FUNCTION module_contents() RETURNS text AS
39+
CREATE FUNCTION module_contents() RETURNSSETOFtext AS
4040
$$
4141
contents = list(filter(lambda x: not x.startswith("__"), dir(plpy)))
4242
contents.sort()
43-
return", ".join(contents)
43+
return contents
4444
$$ LANGUAGE plpythonu;
4545
select module_contents();
46-
module_contents
47-
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
48-
Error, Fatal, SPIError, cursor, debug, error, execute, fatal, info, log, notice, prepare, quote_ident, quote_literal, quote_nullable, spiexceptions, subtransaction, warning
49-
(1 row)
46+
module_contents
47+
-----------------
48+
Error
49+
Fatal
50+
SPIError
51+
cursor
52+
debug
53+
error
54+
execute
55+
fatal
56+
info
57+
log
58+
notice
59+
prepare
60+
quote_ident
61+
quote_literal
62+
quote_nullable
63+
spiexceptions
64+
subtransaction
65+
warning
66+
(18 rows)
5067

5168
CREATE FUNCTION elog_test_basic() RETURNS void
5269
AS $$

‎src/pl/plpython/sql/plpython_test.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or
2727

2828

2929
-- check module contents
30-
CREATEFUNCTIONmodule_contents() RETURNStextAS
30+
CREATEFUNCTIONmodule_contents() RETURNSSETOFtextAS
3131
$$
3232
contents= list(filter(lambda x: notx.startswith("__"), dir(plpy)))
3333
contents.sort()
34-
return",".join(contents)
34+
return contents
3535
$$ LANGUAGE plpythonu;
3636

3737
select module_contents();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp