`obj_description` added to `TypeORM` table comment support - causes error
coler-j opened this issue · 1 comments
coler-j commented
Describe the bug
TypeORM which is a very popular ORM for Node recently added the following obj_description
function call to support table comments in typeorm/typeorm#10613 (typeOrm v0.3.20)
This will cause the following error during sync
QueryFailedError: ERROR: function obj_description(regclass,text) does not exist
Since TypeORM is a popular lib, it would be good to add support for obj_description
or else many people will come here with the same issue.
To Reproduce
SELECT "table_schema", "table_name", obj_description(('"' || "table_schema" || '"."' || "table_name" || '"')::regclass, 'pg_class') AS table_comment FROM "information_schema"."tables" WHERE ("table_schema" = 'public' AND "table_name" = 'my_table')
pg-mem version
2.8.1
anton-brass commented
Workaround till then for me:
this.db.public.registerFunction({
name: "obj_description",
args: [DataType.text, DataType.text],
returns: DataType.text,
implementation: () => "test",
});