The following bug has been logged online:
Bug reference: 3396
Logged by: Sergey Burladyan
Email address: eshkinkot@gmail.com
PostgreSQL version: 8.1.9
Operating system: CentOS release 5 (Final)
Description: strange error report for 'create domain ... default
null'
Details:
i try create domain with 'default null' value, but postgres say:
ERROR: cache lookup failed for type 0
without 'default null' it is work good.
seb=> select version();
version
----------------------------------------------------------------------------
----------------------------
PostgreSQL 8.1.9 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.1
20070105 (Red Hat 4.1.1-52)
(1 row)
Time: 1.160 ms
seb=> begin;
BEGIN
Time: 0.141 ms
seb=> CREATE DOMAIN qos_class_domain AS varchar(32) DEFAULT NULL CHECK
(VALUE IS NULL OR VALUE IN ('be', 'cir', 'cbr'));
ERROR: XX000: cache lookup failed for type 0
LOCATION: typeidTypeRelid, parse_type.c:347
seb=> ROLLBACK ;
ROLLBACK
Time: 0.098 ms
seb=>