mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Remove src/test/regress/sql: plpgsql-nsp-testing.sql per Joe Conway.
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
-- nspname.relname.attname%TYPE
|
||||
DROP FUNCTION t();
|
||||
CREATE OR REPLACE FUNCTION t() RETURNS TEXT AS '
|
||||
DECLARE
|
||||
col_name pg_catalog.pg_attribute.attname%TYPE;
|
||||
BEGIN
|
||||
col_name := ''uga'';
|
||||
RETURN col_name;
|
||||
END;
|
||||
' LANGUAGE 'plpgsql';
|
||||
SELECT t();
|
||||
|
||||
-- nspname.relname%ROWTYPE
|
||||
DROP FUNCTION t();
|
||||
CREATE OR REPLACE FUNCTION t() RETURNS pg_catalog.pg_attribute AS '
|
||||
DECLARE
|
||||
rec pg_catalog.pg_attribute%ROWTYPE;
|
||||
BEGIN
|
||||
SELECT INTO rec * FROM pg_catalog.pg_attribute WHERE attrelid = 1247 AND attname = ''typname'';
|
||||
RETURN rec;
|
||||
END;
|
||||
' LANGUAGE 'plpgsql';
|
||||
SELECT * FROM t();
|
||||
|
||||
-- nspname.relname.attname%TYPE
|
||||
DROP FUNCTION t();
|
||||
CREATE OR REPLACE FUNCTION t() RETURNS pg_catalog.pg_attribute.attname%TYPE AS '
|
||||
DECLARE
|
||||
rec pg_catalog.pg_attribute.attname%TYPE;
|
||||
BEGIN
|
||||
SELECT INTO rec pg_catalog.pg_attribute.attname FROM pg_catalog.pg_attribute WHERE attrelid = 1247 AND attname = ''typname'';
|
||||
RETURN rec;
|
||||
END;
|
||||
' LANGUAGE 'plpgsql';
|
||||
SELECT t();
|
||||
|
||||
-- nspname.relname%ROWTYPE
|
||||
DROP FUNCTION t();
|
||||
CREATE OR REPLACE FUNCTION t() RETURNS pg_catalog.pg_attribute AS '
|
||||
DECLARE
|
||||
rec pg_catalog.pg_attribute%ROWTYPE;
|
||||
BEGIN
|
||||
SELECT INTO rec * FROM pg_catalog.pg_attribute WHERE attrelid = 1247 AND attname = ''typname'';
|
||||
RETURN rec;
|
||||
END;
|
||||
' LANGUAGE 'plpgsql';
|
||||
SELECT * FROM t();
|
||||
Reference in New Issue
Block a user