constraints and sql92 information_schema compliance - Mailing list pgsql-hackers

From Clark C. Evans
Subject constraints and sql92 information_schema compliance
Date
Msg-id 20060225000343.GA33429@prometheusresearch.com
Whole thread Raw
Responses Re: constraints and sql92 information_schema compliance
List pgsql-hackers
Hello all.  I've got a question with regard to the INFORMATION_SCHEMA
of PostgreSQL, specificially related to constraints.  In the SQL92
specification, the DEFINITION_SCHEMA.DOMAIN_CONSTRAINTS (the "imaginary"
base for INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS), has a primary key: CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA,
CONSTRAINT_NAME

This would leave me to believe that at constraints must have a unique
name within a given schema; however, this seems not to be the case:
   # create domain test_one text    -   constraint test check (value is not null);   CREATE DOMAIN
   # create domain test_two text    -   constraint test check (value is not null);   CREATE DOMAIN
   # select constraint_catalog, constraint_schema, constraint_name   -   from information_schema.domain_constraints   -
where domain_name like 'test_%';
 
    constraint_catalog | constraint_schema | constraint_name
--------------------+-------------------+-----------------    cce                | public            | test     cce
          | public            | test      (2 rows)
 

So it would seem that naming rules for constraints in PostgreSQL
isn't exactly compliant with SQL92.  I'm curious what sorts of
constraints are enforced...

Thank you so much,

Clark


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: Remove ora2pg from contrib
Next
From: Josh Berkus
Date:
Subject: Re: constraints and sql92 information_schema compliance