diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2009-08-12 16:37:26 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2009-08-12 16:37:26 +0000 |
| commit | 9d9848668fd868a4e51f3a3f22c2807ff0e46582 (patch) | |
| tree | 22b0152fb889ca42d3e4c6ce888d2024b8b8c98b /src/pl/plpython/sql/plpython_newline.sql | |
| parent | ef7574eb014b66d99a5e68cc254e7a2282e69a00 (diff) | |
| download | postgresql-9d9848668fd868a4e51f3a3f22c2807ff0e46582.tar.gz | |
Split the plpython regression test into test cases arranged by topic, instead
of the previous monolithic setup-create-run sequence, that was apparently
inherited from a previous test infrastructure, but makes working with the
tests and adding new ones weird.
Diffstat (limited to 'src/pl/plpython/sql/plpython_newline.sql')
| -rw-r--r-- | src/pl/plpython/sql/plpython_newline.sql | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pl/plpython/sql/plpython_newline.sql b/src/pl/plpython/sql/plpython_newline.sql new file mode 100644 index 0000000000..6263fac141 --- /dev/null +++ b/src/pl/plpython/sql/plpython_newline.sql @@ -0,0 +1,20 @@ +-- +-- Universal Newline Support +-- + +CREATE OR REPLACE FUNCTION newline_lf() RETURNS integer AS +E'x = 100\ny = 23\nreturn x + y\n' +LANGUAGE plpythonu; + +CREATE OR REPLACE FUNCTION newline_cr() RETURNS integer AS +E'x = 100\ry = 23\rreturn x + y\r' +LANGUAGE plpythonu; + +CREATE OR REPLACE FUNCTION newline_crlf() RETURNS integer AS +E'x = 100\r\ny = 23\r\nreturn x + y\r\n' +LANGUAGE plpythonu; + + +SELECT newline_lf(); +SELECT newline_cr(); +SELECT newline_crlf(); |
