@@ -4,7 +4,7 @@ exports[`plpgsql-deparser bug fixes INTO clause depth-aware scanner should handl
44"DECLARE
55 v_id integer;
66BEGIN
7- SELECT id INTO STRICT v_id FROM users WHERE email = 'test@example.com';
7+ SELECT id INTO STRICT v_id FROM users WHERE email = 'test@example.com';
88 RETURN v_id;
99END"
1010` ;
1616 WITH totals AS (
1717 SELECT sum(amount) as total FROM orders
1818 )
19- SELECT total INTO v_total FROM totals;
19+ SELECT total INTO v_total FROM totals;
2020 RETURN v_total;
2121END"
2222` ;
@@ -25,7 +25,7 @@ exports[`plpgsql-deparser bug fixes INTO clause depth-aware scanner should handl
2525"DECLARE
2626 v_count integer;
2727BEGIN
28- SELECT count(*) INTO v_count FROM (
28+ SELECT count(*) INTO v_count FROM (
2929 SELECT id FROM users
3030 UNION ALL
3131 SELECT id FROM admins
@@ -38,7 +38,7 @@ exports[`plpgsql-deparser bug fixes INTO clause depth-aware scanner should handl
3838"DECLARE
3939 v_result text;
4040BEGIN
41- SELECT $tag$some FROM text$tag$ INTO v_result FROM dual;
41+ SELECT $tag$some FROM text$tag$ INTO v_result FROM dual;
4242 RETURN v_result;
4343END"
4444` ;
@@ -47,7 +47,7 @@ exports[`plpgsql-deparser bug fixes INTO clause depth-aware scanner should handl
4747"DECLARE
4848 v_name text;
4949BEGIN
50- SELECT "user-name" INTO v_name FROM "my-schema"."user-table" WHERE id = 1;
50+ SELECT "user-name" INTO v_name FROM "my-schema"."user-table" WHERE id = 1;
5151 RETURN v_name;
5252END"
5353` ;
@@ -56,7 +56,7 @@ exports[`plpgsql-deparser bug fixes INTO clause depth-aware scanner should inser
5656"DECLARE
5757 v_count integer;
5858BEGIN
59- SELECT count(*) INTO v_count FROM users;
59+ SELECT count(*) INTO v_count FROM users;
6060 RETURN v_count;
6161END"
6262` ;
@@ -65,7 +65,7 @@ exports[`plpgsql-deparser bug fixes INTO clause depth-aware scanner should not i
6565"DECLARE
6666 v_result integer;
6767BEGIN
68- SELECT (SELECT max(id) FROM orders) INTO v_result FROM users WHERE id = 1;
68+ SELECT (SELECT max(id) FROM orders) INTO v_result FROM users WHERE id = 1;
6969 RETURN v_result;
7070END"
7171` ;
103103
104104exports [` plpgsql-deparser bug fixes Record field qualification (recfield) should handle SELECT INTO with record fields 1` ] = `
105105"BEGIN
106- SELECT is_active INTO new.is_active FROM users WHERE id = NEW.user_id;
106+ SELECT is_active INTO new.is_active FROM users WHERE id = NEW.user_id;
107107 RETURN NEW;
108108END"
109109` ;
@@ -148,7 +148,7 @@ exports[`plpgsql-deparser bug fixes combined scenarios should handle SELECT INTO
148148"DECLARE
149149 v_count integer;
150150BEGIN
151- SELECT count(*) INTO v_count FROM orders WHERE user_id = NEW.user_id;
151+ SELECT count(*) INTO v_count FROM orders WHERE user_id = NEW.user_id;
152152 IF v_count > 100 THEN
153153 NEW.is_premium := true;
154154 END IF;
0 commit comments