Languages

In the object hierarchy of every database, you will find Languages. Languages can be added by selecting CREATE LANGUAGE from the Languages context menu. Once a language has been created, it can also be dropped. This section describes how to create and drop a language with RHDB Administrator.

Creating a New Language

When creating a language, the only required parameter is a unique name for the new language. However, there are several optional parameters that you can set:

Refer to the CREATE LANGUAGE and CREATE FUNCTION sections in the Red Hat Database SQL Guide and Reference for more information on these parameters and keywords.

This example describes how to define the trusted procedural language plpgsql in a database.

  1. A language is an object under a database, so to create a language, first expand the database under which you wish to create the language (click the + beside the database name).

  2. Right-click on Languages and select CREATE LANGUAGE. The CREATE LANGUAGE dialog appears.

  3. For the language name, type: plpgsql

  4. For the handler name, type: plpgsql_call_handler()

  5. For the handler location name, type: /usr/lib/pgsql/plpgsql.so

  6. Enable the attributes: Trusted and Procedural.

  7. For the Compiler, type: PL/pgSQL.

  8. Click OK to define the new language.

Note that the function plpgsql_call_handler() has been added under the Functions node in the Tree View and the language plpgsql has been added under the Languages node.

Creating a Language with "Manage Supported Languages"

The Manage Supported Languages dialog enables you to create and drop the supported languages and their language handlers in RHDB Administrator. In RHDB Administrator Version 1.0, the supported languages are plperl, plpgsql, pltcl, and pltclu.

To create a language, select the languages you want to install from Languages Available, click Add to add them to the list of languages to be installed, then click OK. The language handler will be created automatically.

RHDB Administrator also enables you to drop existing languages in two ways: