after executing following query: insert regiony (m_valid, m_validationreport, m_creation_timestamp, m_creation_user, m_modification_timestamp, m_modification_user, instance, kod_regionu, nazwa_gminy, kod_teryt) select distinct null, null, now(), 'abc', now(), 'abc', null, region_poch, export_gmina, replace(teryt, '|', '') source_table i following error: error: column "m_valid" of type boolean expression of type text i tried convert null value boolean (null::boolean), , worked boolean, instance column in target table (regiony) of type xml , pgsql refuses convert null xml. after converting null xml, get: error: not identify equality operator type xml any suggestions? of columns receiving null values allow null values , i'm running out of ideas. cheers, jan try rewriting without explicit null statements, letting pg handle them needed: insert regiony ( m_creation_timestamp, m_creation_user, m_modificati...