1
0
mirror of https://github.com/postgres/postgres.git synced 2026-01-13 12:22:55 +03:00
Files
postgres/src/pl/plpython/expected/plpython_newline.out
Peter Eisentraut 9d9848668f 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.
2009-08-12 16:37:26 +00:00

31 lines
598 B
Plaintext

--
-- 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();
newline_lf
------------
123
(1 row)
SELECT newline_cr();
newline_cr
------------
123
(1 row)
SELECT newline_crlf();
newline_crlf
--------------
123
(1 row)