2022-02-10 09:31:44 +03:00
type : bulk
args :
- type : run_sql
args :
sql : |
CREATE TABLE "automatic_comment_in_db" (
2022-02-16 02:16:34 +03:00
id serial primary key,
name text not null
2022-02-10 09:31:44 +03:00
);
COMMENT ON TABLE "automatic_comment_in_db" IS 'What a great comment in the DB';
2022-03-09 09:34:47 +03:00
COMMENT ON COLUMN "automatic_comment_in_db"."name" IS 'The name column comment in the DB';
2022-02-16 02:16:34 +03:00
CREATE FUNCTION automatic_comment_in_db_upper_name(r "automatic_comment_in_db")
RETURNS text
LANGUAGE 'sql'
STABLE
AS $BODY$
SELECT upper(r.name)
$BODY$;
COMMENT ON FUNCTION "automatic_comment_in_db_upper_name"("automatic_comment_in_db") IS 'What a great comment on the function in the DB';
2022-02-10 09:31:44 +03:00
- type : run_sql
args :
sql : |
CREATE TABLE "automatic_no_comment_in_db" (
2022-02-16 02:16:34 +03:00
id serial primary key,
name text not null
2022-02-10 09:31:44 +03:00
);
2022-02-16 02:16:34 +03:00
CREATE FUNCTION automatic_no_comment_in_db_upper_name(r "automatic_no_comment_in_db")
RETURNS text
LANGUAGE 'sql'
STABLE
AS $BODY$
SELECT upper(r.name)
$BODY$;
2022-02-10 09:31:44 +03:00
- type : run_sql
args :
sql : |
CREATE TABLE "explicit_comment_in_metadata" (
2022-02-16 02:16:34 +03:00
id serial primary key,
name text not null
2022-02-10 09:31:44 +03:00
);
COMMENT ON TABLE "explicit_comment_in_metadata" IS 'Fantastic comment, so good, so hidden';
2022-03-09 09:34:47 +03:00
COMMENT ON COLUMN "explicit_comment_in_metadata"."name" IS 'The name column comment in the DB, but hidden!';
2022-02-16 02:16:34 +03:00
CREATE FUNCTION explicit_comment_in_metadata_upper_name(r "explicit_comment_in_metadata")
RETURNS text
LANGUAGE 'sql'
STABLE
AS $BODY$
SELECT upper(r.name)
$BODY$;
COMMENT ON FUNCTION "explicit_comment_in_metadata_upper_name"("explicit_comment_in_metadata") IS 'Fantastic comment on the function, so good, so hidden';
2022-02-10 09:31:44 +03:00
- type : run_sql
args :
sql : |
CREATE TABLE "explicit_no_comment_in_metadata" (
2022-02-16 02:16:34 +03:00
id serial primary key,
name text not null
2022-02-10 09:31:44 +03:00
);
COMMENT ON TABLE "explicit_no_comment_in_metadata" IS 'This would be a great comment, but you can''t see it';
2022-03-09 09:34:47 +03:00
COMMENT ON COLUMN "explicit_no_comment_in_metadata"."name" IS 'The name column comment in the DB, but you can''t see it';
2022-02-16 02:16:34 +03:00
CREATE FUNCTION explicit_no_comment_in_metadata_upper_name(r "explicit_no_comment_in_metadata")
RETURNS text
LANGUAGE 'sql'
STABLE
AS $BODY$
SELECT upper(r.name)
$BODY$;
COMMENT ON FUNCTION "explicit_no_comment_in_metadata_upper_name"("explicit_no_comment_in_metadata") IS 'This would be a great comment on the function, but you can''t see it';