While playing around with a preliminary version of the information schema
I get a failure in the type_sanity regression test here:

-- Look for basic types that don't have an array type.
-- NOTE: as of 7.3, this check finds SET, smgr, and unknown.

SELECT p1.oid, p1.typname
FROM pg_type as p1
WHERE p1.typtype in ('b','d') AND p1.typname NOT LIKE '\\_%' AND NOT
EXISTS
    (SELECT 1 FROM pg_type as p2
     WHERE p2.typname = ('_' || p1.typname)::name AND
           p2.typelem = p1.oid);

The information schema contains a couple of domains, but apparently no
arrays are generated for those.  How is that supposed to be fixed?

-- 
Peter Eisentraut   peter_e@gmx.net


Fri, 13 Dec 2002 00:08:42 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Arrays for domain types
Peter Eisentraut <peter_e@gmx.net> writes:
> While playing around with a preliminary version of the information schema
> I get a failure in the type_sanity regression test here:

> SELECT p1.oid, p1.typname
> FROM pg_type as p1
> WHERE p1.typtype in ('b','d') AND p1.typname NOT LIKE '\\_%' AND NOT
> EXISTS
>     (SELECT 1 FROM pg_type as p2
>      WHERE p2.typname = ('_' || p1.typname)::name AND
>            p2.typelem = p1.oid);

For the moment I'd suggest backing off the regression test from
	 p1.typtype in ('b','d')
to
	 p1.typtype in ('b')
Probably eventually CREATE DOMAIN ought to create an associated array
type, but it's not really your problem if it doesn't ...

			regards, tom lane

Fri, 13 Dec 2002 00:56:38 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Arrays for domain types 