Jarkko
The drop script had a syntax error, I fixed it. So its running fine without any errors. The create script is also able to create the privileges, table, etc successfully.
However, I get the following error while running the create script. This is the only error now.
function acs_object_type__create_type("unknown","unknown","unknown","unknown","unknown","unknown", "unknown") does not exist.
FOLLOWING IS THE CONCERNING CODE
-- Create a room object
create function inline_0()
returns integer as '
declare
attr_id acs_attributes.attribute_id%TYPE;
begin
/*I have also tried with
PERFORM acs_object_type__create_type(
*/
attr_id := acs_object_type__create_type (
''room'', -- object_type
''Chat Room'', -- pretty_name
''Chat Rooms'', -- pretty_plural
''acs_object'', -- supertype
''chat_rooms'', -- table_name
''room_id'', -- id_column
null -- name_method
);
-- Create attributes for object room
-- Attribute: pretty name
attr_id := acs_attribute__create_attribute (
''room'', -- object_type
''pretty_name'', -- attribute_name
''string'', -- datatype
''Room Name'', -- pretty_name
''Room Names'' -- pretty_plural
);
-- Attribute: detail
attr_id := acs_attribute__create_attribute (
''room'', -- object_type
''detail'', -- attribute_name
''string'', -- datatype
''Detail'', -- pretty_name
''Details'' -- pretty_plural
);
-- Attribute: moderated
attr_id := acs_attribute_create_attribute (
''room'', -- object_type
''moderated_p'', -- attribute_name
''boolean'', -- datatype
''Moderated'', -- pretty_name
''Moderated'' -- pretty_plural
);
-- Attribute: active
attr_id := acs_attribute_create_attribute (
''room'', -- object_type
''active_p'', -- attribute_name
''boolean'', -- datatype
''Activated'', -- pretty_name
''Activated'' -- pretty_plural
);
return 0;
end;'
language plpgsql;
select inline_0();
drop function inline_0();
-----------------------------
Many thanks for the unending help 😊)
Ashem