5.
Special Notes for PostgreSQL
Up one level
Creating the plpgsql language
The GRIA OGSA-DAI service makes use of functions written in the plpgsql language. Before using the GRIA OGSA-DAI service, you need to enable this language in the template database.
- Login to the database server using the "template1" database.
eg. psql -U postgres -W template1 - Execute the following command:
CREATE LANGUAGE plpgsql;
Creating tables
Due to a limitation of PostgreSQL, it is not possible to automatically set the correct permissions on new tables on databases created by the OGSA-DAI service. After executing a CREATE TABLE command, you are required to execute the following function:
SELECT grant_access_to_table(table_name);
For example, to create a table named testtable, you should perform the following SQL queries:
CREATE TABLE testtable (testcolumn TEXT);
SELECT grant_access_to_table('testtable');
Note that this is only necessary on databases created by users of the OGSA-DAI service. It is not needed for existing databases that have been connected to the service.
