Using Toad Data Modeler 5.3 with PostgreSQL, I created an index on a table in schema called “ua”. I also added description.
Related part of the generated DDL is below:
CREATE TABLE “ua”.“ua_entity”( … );
COMMENT ON COLUMN “ua”.“ua_entity”.“id” IS ‘Entity id no.’;
CREATE UNIQUE INDEX “ua_idx_entity_unique_url_for_org” ON “ua”.“ua_entity” (“organization_id”,“url”) WHERE url IS NOT NULL;
COMMENT ON INDEX “ua_idx_entity_unique_url_for_org” IS ‘Index for speed.’;
This DDL causes error, because schema prefix is not added to index description. However schema prefix added column description as seen above. This behavior of Toad Data Modeler is inconsistent and results in error below:
ERROR: relation “ua_idx_entity_unique_url_for_org” does not exist.
Adding schema name to index name also does not help, because Toad Data Modeler generates names in quotation marks.
Is there any workaround until this gets fixed?
PS. This behavior does not affect descriptions in “public” schema, because PostgreSQL assumes any non prefixed object in “public” schema.