mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-09 12:17:35 +08:00
Add plpython code.
This commit is contained in:
11
src/pl/plpython/plpython_setof.sql
Normal file
11
src/pl/plpython/plpython_setof.sql
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
CREATE FUNCTION test_setof() returns setof text
|
||||
AS
|
||||
'if GD.has_key("calls"):
|
||||
GD["calls"] = GD["calls"] + 1
|
||||
if GD["calls"] > 2:
|
||||
return None
|
||||
else:
|
||||
GD["calls"] = 1
|
||||
return str(GD["calls"])'
|
||||
LANGUAGE 'plpython';
|
||||
Reference in New Issue
Block a user