Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ descriptions AS (
FROM pg_class AS cls
INNER JOIN pg_namespace ON cls.relnamespace = pg_namespace.oid
LEFT JOIN pg_description ON cls.oid = pg_description.objoid AND pg_description.objsubid = 0
WHERE cls.relkind = 'r' OR cls.relkind = 'v'
WHERE cls.relkind IN ('r', 'v', 'm')
)

SELECT
Expand Down
14 changes: 14 additions & 0 deletions tests/fixtures/tables/materialized_view.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE fixtures_comments (
id serial PRIMARY KEY,
txt text,
geom GEOMETRY (POINT, 4326)
);

INSERT INTO fixtures_comments (txt, geom) VALUES
('a', ST_GeomFromText('POINT(-122.4194 37.7749)', 4326)),
('b', ST_GeomFromText('POINT(-73.935242 40.730610)', 4326));

CREATE MATERIALIZED VIEW fixtures_mv_comments AS
SELECT id, txt, geom FROM fixtures_comments;

COMMENT ON MATERIALIZED VIEW fixtures_mv_comments IS 'fixture: materialized view comments';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should make this into a proper json comment, just like other SQL, rather than ignoring this warning below

4 changes: 4 additions & 0 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ test_pbf antimeridian_4_0_5 antimeridian/4/0/5
test_jsn tbl_comment MixPoints
test_jsn fnc_comment function_Mixed_Name

>&2 echo "***** Test server response for materialized view *****"
test_jsn mv_comment fixtures_mv_comments
test_pbf mv_comment_0_0_0 fixtures_mv_comments/0/0/0

>&2 echo "***** Test server response for the same name in different schemas *****"
test_jsn same_name_different_schema_table1 table_name_existing_two_schemas
test_pbf same_name_different_schema_table1_0_0_0 table_name_existing_two_schemas/0/0/0
Expand Down
Loading