Question on "record type has not been registered" - Mailing list pgsql-hackers

From Jim Nasby
Subject Question on "record type has not been registered"
Date
Msg-id 9f1db94a-fa18-5975-3a6c-6850fabb3865@BlueTreble.com
Whole thread Raw
List pgsql-hackers
I'm working on a function(attached) that returns a bitmask of NULL
fields in a record. It works fine if I feed it a row directly, but fails
in this case:

select record_nulls(r), expected, CASE WHEN record_nulls(r) <> expected
THEN 'BAD' END AS bad, r
from (values(row(NULL,NULL,NULL,2,2,NULL,2,2), '11100100'::varbit),
(row(2),'0')
) v(r,expected)
;
ERROR:  record type has not been registered

I'm not sure why this is failing; a simple SELECT * from that FROM
clause works fine. I also tried removing the second row in case the
mismatch of record types was the issue; that didn't help either.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461

Attachment

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: postgres_fdw super user checks
Next
From: Jim Nasby
Date:
Subject: bit|varbit #, xor operator