You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop dead code, replace COPY-with-lint-suppression with a plain INSERT
- sql/object_reference.sql: the commented-out CREATE TEMP TABLE ... AS
alternative in the ddl_capture exception handler was dead weight,
not a real alternative worth preserving in a comment.
- test/helpers/object_table.sql: the disable-block was working around
the linter scanning raw COPY payload text for type-name substrings.
A quoted string literal isn't scanned at all, so a plain multi-row
INSERT needs no suppression -- same data, properly quoted.
function|test function|"test column"int DEFAULT 0|CREATE FUNCTION "test function"("test column"int DEFAULT 0) RETURNS int LANGUAGE sql AS'SELECT $1'|DROP FUNCTION "test function"(int)
158
-
type|test type||CREATE TYPE "test type" (INPUT ="test type in", OUTPUT ="test type out")|DROP TYPE "test type" CASCADE; -- Need to cascade due to functions
, ('function', 'test function', '"test column" int DEFAULT 0', 'CREATE FUNCTION "test function"("test column" int DEFAULT 0) RETURNS int LANGUAGE sql AS ''SELECT $1''', 'DROP FUNCTION "test function"(int)')
156
+
, ('type', 'test type', '', 'CREATE TYPE "test type" (INPUT = "test type in", OUTPUT = "test type out")', 'DROP TYPE "test type" CASCADE; -- Need to cascade due to functions')
157
+
-- secondary mirrors pg_catalog's own type display name (format_type() of int4), not a style choice -- not "int" per prefer-short-type
158
+
, ('cast', 'test type', 'integer', 'CREATE CAST ("test type" AS int4) WITH INOUT', 'DROP CAST ("test type" AS int4)')
159
+
, ('default value', 'test table', 'test column', 'ALTER TABLE "test table" ALTER "test column" SET DEFAULT 0', 'ALTER TABLE "test table" ALTER "test column" DROP DEFAULT')
160
+
, ('trigger', 'test table', 'test trigger', 'CREATE TRIGGER "test trigger" AFTER INSERT ON "test table" FOR EACH ROW EXECUTE PROCEDURE tg_null()', 'DROP TRIGGER "test trigger" ON "test table"')
161
+
;
164
162
165
163
/* EXCLUDED CODE: Not supported
166
164
composite type|test complex type||CREATE TYPE "test complex type" AS(r real, i real)|DROP TYPE "test complex type"
0 commit comments