Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
84d457ed
Commit
84d457ed
authored
Oct 19, 2016
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format PL/Python module contents test vertically
It makes it readable again and makes merges more manageable.
parent
4f714b2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
src/pl/plpython/expected/plpython_test.out
src/pl/plpython/expected/plpython_test.out
+23
-6
src/pl/plpython/sql/plpython_test.sql
src/pl/plpython/sql/plpython_test.sql
+2
-2
No files found.
src/pl/plpython/expected/plpython_test.out
View file @
84d457ed
...
...
@@ -36,17 +36,34 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or
(3 rows)
-- 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.sort()
return
", ".join(contents)
return
contents
$$ LANGUAGE plpythonu;
select 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
(1 row)
module_contents
-----------------
Error
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
AS $$
...
...
src/pl/plpython/sql/plpython_test.sql
View file @
84d457ed
...
...
@@ -27,11 +27,11 @@ select "Argument test #1"(users, fname, lname) from users where lname = 'doe' or
-- 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
.
sort
()
return
", "
.
join
(
contents
)
return
contents
$$
LANGUAGE
plpythonu
;
select
module_contents
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment