diff --git a/src/PostgREST/DbStructure.hs b/src/PostgREST/DbStructure.hs index 69213e95f..691010b29 100644 --- a/src/PostgREST/DbStructure.hs +++ b/src/PostgREST/DbStructure.hs @@ -437,7 +437,7 @@ allColumns tabs = nc.nspname::information_schema.sql_identifier AS table_schema, c.relname::information_schema.sql_identifier AS table_name, a.attname::information_schema.sql_identifier AS column_name, - d.description::information_schema.sql_identifier AS description, + d.description AS description, a.attnum::information_schema.cardinal_number AS ordinal_position, pg_get_expr(ad.adbin, ad.adrelid)::information_schema.character_data AS column_default, CASE diff --git a/test/Feature/StructureSpec.hs b/test/Feature/StructureSpec.hs index 3bd7d7418..8bd20a9b3 100644 --- a/test/Feature/StructureSpec.hs +++ b/test/Feature/StructureSpec.hs @@ -125,7 +125,7 @@ spec = do "type": "integer" }, "name": { - "description": "child_entities name comment", + "description": "child_entities name comment. Can be longer than sixty-three characters long", "format": "text", "type": "string" }, diff --git a/test/fixtures/schema.sql b/test/fixtures/schema.sql index 2c373329d..92e61e97a 100755 --- a/test/fixtures/schema.sql +++ b/test/fixtures/schema.sql @@ -1226,7 +1226,7 @@ create table ranges ( comment on table child_entities is 'child_entities comment'; comment on column child_entities.id is 'child_entities id comment'; -comment on column child_entities.name is 'child_entities name comment'; +comment on column child_entities.name is 'child_entities name comment. Can be longer than sixty-three characters long'; comment on table grandchild_entities is $$grandchild_entities summary