Bug report #18053

Only public postgres domains recognized

Added by David Signer over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Normal
Assignee:Denis Rouzaud
Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System:Linux and Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25949

Description

When a domain like this is defined in the public schema:

CREATE DOMAIN public.farbdomain
AS text
COLLATE pg_catalog."default"
CONSTRAINT domainconstraint CHECK (VALUE = ANY (ARRAY['rot'::text, 'geld'::text, 'blau'::text]));
ALTER DOMAIN public.farbdomain
OWNER TO postgres;

And it's defined for a column in no matter what schema:
CREATE TABLE boekat.farben
(
id integer NOT NULL,
farbe farbdomain,
geom geometry(Geometry,25832),
CONSTRAINT farben_pkey PRIMARY KEY (id)
)

We can select a column with the type farbdomain it as an enumeration drop down in the attribute form.

But when the domain is not in public schema, enumeration as a widget type is not available and it appears as text.

Associated revisions

Revision 498e5518
Added by Denis Rouzaud over 2 years ago

[postgres] fix domain not in public schema

fix #18053
correctly set enumeration widget in case the domain is not in public schema
also fixes an issue if two domain with the same are present in two schemas

Revision 1f051ff1
Added by Denis Rouzaud over 2 years ago

[postgres] fix domain not in public schema

fix #18053
see PR #6304

History

#1 Updated by David Signer over 2 years ago

  • Assignee set to Denis Rouzaud

#2 Updated by Denis Rouzaud over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#3 Updated by Giovanni Manghi over 2 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF