           ;
       EXCEPTION WHEN no_data_found THEN
         -- At this point regclass or regtype should have thrown an error if the parent object doesn't exist
+        IF c_loose THEN
+          RETURN NULL;
+        END IF;
         RAISE 'constraint "%" does not exist', secondary
           USING ERRCODE = 'undefined_object'
         ;

  , object_name text
  , secondary text DEFAULT NULL
  , object_group_name _object_reference.object_group.object_group_name%TYPE DEFAULT NULL
$args$
  , 'int LANGUAGE sql'
  , $body$

          AND adnum = (cat_tools.pg_attribute__get(object_name::regclass, secondary)).attnum
      ;
    EXCEPTION WHEN no_data_found THEN
      IF c_loose THEN
        RETURN NULL;
      END IF;
      RAISE 'default value for %.% does not exist', object_name::regclass, secondary
        USING ERRCODE = 'undefined_object'
      ;
