MySource Error
[ASSERT EXCEPTION] DB Error: syntax error
CREATE INDEX sq_ast_attr_val_concat ON sq_ast_attr_val ((assetid || '~' || attrid)) [nativecode=ERROR: parser: parse error at or near "(" at character 57] (LINE 263 IN [SYSTEM_ROOT]/core/lib/db_install/db_install.inc)
Has anyone a idea?
Your version of PostgreSQL doesn't support concatenated indexes. Though, this does mean you're connecting to PostgreSQL.
The installer developer will be back in tomorrow, and he'll take a look then.
I cant remember exactly where it is, but you can remove the index lines from our DB XML schema file to allow Matrix to install on your version of PostgreSQL (the index is not required).
The file is in MYSOURCE_ROOT/core/assets/tables.xml
Look for a line where has "assetid || '~' || attrid" on it and remove the index tag that defines it (or comment it out).
If i comment this line out, then i got another error:
MySource Warning
DB Error: unknown error
CREATE OR REPLACE FUNCTION sq_grant_access(character varying) RETURNS TEXT AS ' DECLARE user_name ALIAS FOR $1; table RECORD; tablename TEXT; BEGIN FOR table IN SELECT c.relname AS name FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN (''r'',''v'',''S'','''') AND n.nspname NOT IN (''pg_catalog'', ''pg_toast'') AND pg_catalog.pg_table_is_visible(c.oid) LOOP tablename=table.name; RAISE NOTICE ''tablename is %'', tablename; EXECUTE ''GRANT ALL ON '' || quote_ident(tablename) || '' TO '' || quote_ident(user_name::text); END LOOP; RETURN ''access granted.''; END; ' LANGUAGE plpgsql; [nativecode=ERROR: language "plpgsql" does not exist]
MySource Error
TABLE INSTALL FAILURE
TABLE CREATION COMPLETE
SEQUENCE CREATION COMPLETE
After creating your database with the createdb command, you need to add the PlPgSQL language by running:
[font=“courier”]# createlang plpgsql <database-name>[/font]
It appears that some implementations of PostgreSQL (most notably on Red Hat distros) don’t add this automatically.
I'm not aware of any distro that does. If you want it installed into all databases you create, I think you have to createlang plpgsql template1 (which is used as the base for all databases when they're created). Can anyone confirm that?
I'm somewhat sure that PostgreSQL 8.0 on Windows already has the PL/pgSQL language in template1, but not completely sure.