Question on "record type has not been registered"

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Question on "record type has not been registered"
Дата
Msg-id 9f1db94a-fa18-5975-3a6c-6850fabb3865@BlueTreble.com
обсуждение исходный текст
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: postgres_fdw super user checks
Следующее
От: Jim Nasby
Дата:
Сообщение: bit|varbit #, xor operator