Commit bc0be355 authored by Bruce Momjian's avatar Bruce Momjian

Adjust PL regression tests for escape_string_warning.

parent daab4a10
...@@ -259,13 +259,13 @@ return seq ...@@ -259,13 +259,13 @@ return seq
-- Universal Newline Support -- Universal Newline Support
-- --
CREATE OR REPLACE FUNCTION newline_lf() RETURNS integer AS CREATE OR REPLACE FUNCTION newline_lf() RETURNS integer AS
'x = 100\ny = 23\nreturn x + y\n' E'x = 100\ny = 23\nreturn x + y\n'
LANGUAGE plpythonu; LANGUAGE plpythonu;
CREATE OR REPLACE FUNCTION newline_cr() RETURNS integer AS CREATE OR REPLACE FUNCTION newline_cr() RETURNS integer AS
'x = 100\ry = 23\rreturn x + y\r' E'x = 100\ry = 23\rreturn x + y\r'
LANGUAGE plpythonu; LANGUAGE plpythonu;
CREATE OR REPLACE FUNCTION newline_crlf() RETURNS integer AS CREATE OR REPLACE FUNCTION newline_crlf() RETURNS integer AS
'x = 100\r\ny = 23\r\nreturn x + y\r\n' E'x = 100\r\ny = 23\r\nreturn x + y\r\n'
LANGUAGE plpythonu; LANGUAGE plpythonu;
-- --
-- Unicode error handling -- Unicode error handling
......
...@@ -303,15 +303,15 @@ return seq ...@@ -303,15 +303,15 @@ return seq
-- --
CREATE OR REPLACE FUNCTION newline_lf() RETURNS integer AS CREATE OR REPLACE FUNCTION newline_lf() RETURNS integer AS
'x = 100\ny = 23\nreturn x + y\n' E'x = 100\ny = 23\nreturn x + y\n'
LANGUAGE plpythonu; LANGUAGE plpythonu;
CREATE OR REPLACE FUNCTION newline_cr() RETURNS integer AS CREATE OR REPLACE FUNCTION newline_cr() RETURNS integer AS
'x = 100\ry = 23\rreturn x + y\r' E'x = 100\ry = 23\rreturn x + y\r'
LANGUAGE plpythonu; LANGUAGE plpythonu;
CREATE OR REPLACE FUNCTION newline_crlf() RETURNS integer AS CREATE OR REPLACE FUNCTION newline_crlf() RETURNS integer AS
'x = 100\r\ny = 23\r\nreturn x + y\r\n' E'x = 100\r\ny = 23\r\nreturn x + y\r\n'
LANGUAGE plpythonu; LANGUAGE plpythonu;
-- --
......
...@@ -38,7 +38,7 @@ create table T_dta2 ( ...@@ -38,7 +38,7 @@ create table T_dta2 (
-- --
-- Function to check key existance in T_pkey1 -- Function to check key existance in T_pkey1
-- --
create function check_pkey1_exists(int4, bpchar) returns bool as ' create function check_pkey1_exists(int4, bpchar) returns bool as E'
if {![info exists GD]} { if {![info exists GD]} {
set GD(plan) [spi_prepare \\ set GD(plan) [spi_prepare \\
"select 1 from T_pkey1 \\ "select 1 from T_pkey1 \\
...@@ -146,7 +146,7 @@ create trigger pkey1_before before insert or update or delete on T_pkey1 ...@@ -146,7 +146,7 @@ create trigger pkey1_before before insert or update or delete on T_pkey1
-- Trigger function to check for duplicate keys in T_pkey2 -- Trigger function to check for duplicate keys in T_pkey2
-- and to force key2 to be upper case only without leading whitespaces -- and to force key2 to be upper case only without leading whitespaces
-- --
create function trig_pkey2_before() returns trigger as ' create function trig_pkey2_before() returns trigger as E'
# #
# Prepare plan on first call # Prepare plan on first call
# #
...@@ -185,7 +185,7 @@ create trigger pkey2_before before insert or update on T_pkey2 ...@@ -185,7 +185,7 @@ create trigger pkey2_before before insert or update on T_pkey2
-- in T_pkey2 are done so the trigger for primkey check on T_dta2 -- in T_pkey2 are done so the trigger for primkey check on T_dta2
-- fired on our updates will see the new key values in T_pkey2. -- fired on our updates will see the new key values in T_pkey2.
-- --
create function trig_pkey2_after() returns trigger as ' create function trig_pkey2_after() returns trigger as E'
# #
# Prepare plans on first call # Prepare plans on first call
# #
...@@ -268,7 +268,7 @@ create trigger pkey2_after after update or delete on T_pkey2 ...@@ -268,7 +268,7 @@ create trigger pkey2_after after update or delete on T_pkey2
-- --
-- Generic trigger function to check references in T_dta1 and T_dta2 -- Generic trigger function to check references in T_dta1 and T_dta2
-- --
create function check_primkey() returns trigger as ' create function check_primkey() returns trigger as E'
# #
# For every trigger/relation pair we create # For every trigger/relation pair we create
# a saved plan and hold them in GD # a saved plan and hold them in GD
......
...@@ -44,7 +44,7 @@ create table T_dta2 ( ...@@ -44,7 +44,7 @@ create table T_dta2 (
-- --
-- Function to check key existance in T_pkey1 -- Function to check key existance in T_pkey1
-- --
create function check_pkey1_exists(int4, bpchar) returns bool as ' create function check_pkey1_exists(int4, bpchar) returns bool as E'
if {![info exists GD]} { if {![info exists GD]} {
set GD(plan) [spi_prepare \\ set GD(plan) [spi_prepare \\
"select 1 from T_pkey1 \\ "select 1 from T_pkey1 \\
...@@ -64,7 +64,7 @@ create function check_pkey1_exists(int4, bpchar) returns bool as ' ...@@ -64,7 +64,7 @@ create function check_pkey1_exists(int4, bpchar) returns bool as '
-- --
-- Trigger function on every change to T_pkey1 -- Trigger function on every change to T_pkey1
-- --
create function trig_pkey1_before() returns trigger as ' create function trig_pkey1_before() returns trigger as E'
# #
# Create prepared plans on the first call # Create prepared plans on the first call
# #
...@@ -158,7 +158,7 @@ create trigger pkey1_before before insert or update or delete on T_pkey1 ...@@ -158,7 +158,7 @@ create trigger pkey1_before before insert or update or delete on T_pkey1
-- Trigger function to check for duplicate keys in T_pkey2 -- Trigger function to check for duplicate keys in T_pkey2
-- and to force key2 to be upper case only without leading whitespaces -- and to force key2 to be upper case only without leading whitespaces
-- --
create function trig_pkey2_before() returns trigger as ' create function trig_pkey2_before() returns trigger as E'
# #
# Prepare plan on first call # Prepare plan on first call
# #
...@@ -201,7 +201,7 @@ create trigger pkey2_before before insert or update on T_pkey2 ...@@ -201,7 +201,7 @@ create trigger pkey2_before before insert or update on T_pkey2
-- in T_pkey2 are done so the trigger for primkey check on T_dta2 -- in T_pkey2 are done so the trigger for primkey check on T_dta2
-- fired on our updates will see the new key values in T_pkey2. -- fired on our updates will see the new key values in T_pkey2.
-- --
create function trig_pkey2_after() returns trigger as ' create function trig_pkey2_after() returns trigger as E'
# #
# Prepare plans on first call # Prepare plans on first call
# #
...@@ -288,7 +288,7 @@ create trigger pkey2_after after update or delete on T_pkey2 ...@@ -288,7 +288,7 @@ create trigger pkey2_after after update or delete on T_pkey2
-- --
-- Generic trigger function to check references in T_dta1 and T_dta2 -- Generic trigger function to check references in T_dta1 and T_dta2
-- --
create function check_primkey() returns trigger as ' create function check_primkey() returns trigger as E'
# #
# For every trigger/relation pair we create # For every trigger/relation pair we create
# a saved plan and hold them in GD # a saved plan and hold them in GD
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment