Detail of Concepts Managed by PostgreSQL
All SQL commands are available at the following address:
Tables
Indexes
Tablespaces
Views
CREATE VIEW v_example_character_type AS
SELECT col_char1, col_char2
FROM example_character_type
WHERE col_char1 = 'A';
Triggers
Example:
CREATE OR REPLACE FUNCTION test() RETURNS trigger AS $$
BEGIN
RETURN 0;
END IF;
$$ LANGUAGE plpgsql;
CREATE TRIGGER check_update
BEFORE UPDATE ON example_character_type
FOR EACH ROW
EXECUTE PROCEDURE test();
Sequences
Example:
CREATE SEQUENCE example_sequence
INCREMENT 1
MINVALUE 1
START 101 ;
Functions
Example:
CREATE OR REPLACE FUNCTION test() RETURNS trigger AS $$
BEGIN
RETURN i + 1;
END IF;
$$ LANGUAGE plpgsql;
Materialized views
This concept is managed in MEGA by specifying the appropriate type to a view.
However, MEGA presents two restrictions:
- It is not possible to specify a tablespace for storage of the view.
- More generally, it is not possible to specify physical parameters.
Domains and types
These are two concepts that enable management of structures of elementary datatypes. These concepts exist for other DBMSs.
These concepts are not initially managed. A detailed study is necessary.
"Trigger events"
This concept enables extension of the trigger concept to a database.
MEGA does not currently offer suitable management of this concept.