diff options
Diffstat (limited to 'src/pl/plpython/plpython_function.sql')
-rw-r--r-- | src/pl/plpython/plpython_function.sql | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pl/plpython/plpython_function.sql b/src/pl/plpython/plpython_function.sql index 801222f4ef8..c849c3e5b97 100644 --- a/src/pl/plpython/plpython_function.sql +++ b/src/pl/plpython/plpython_function.sql @@ -306,3 +306,19 @@ CREATE OR REPLACE FUNCTION write_file(text,text) RETURNS text AS ' open(args[0],"w").write(args[1]) return "Wrote to file: %s" % args[0] ' LANGUAGE plpythonu; + +-- +-- Universal Newline Support +-- + +CREATE OR REPLACE FUNCTION newline_lf() RETURNS integer AS +'x = 100\ny = 23\nreturn x + y\n' +LANGUAGE plpythonu; + +CREATE OR REPLACE FUNCTION newline_cr() RETURNS integer AS +'x = 100\ry = 23\rreturn x + y\r' +LANGUAGE plpythonu; + +CREATE OR REPLACE FUNCTION newline_crlf() RETURNS integer AS +'x = 100\r\ny = 23\r\nreturn x + y\r\n' +LANGUAGE plpythonu; |