-
Notifications
You must be signed in to change notification settings - Fork 4
LexDbFunctions
The LexDB uses a PostgreSQL database to provide a source of lexical items for client applications such as the LKB. This page provides a description of the internal (but "public") database functions used by a client connected to the LexDB. See also LexDbInternals for some documentation on the structure of the database itself.
-
check_psql_server_version RETURNS SETOF text Returns nothing if psql server version is compatible with the LexDB. Else returns message text.
-
clear_rev() RETURNS boolean
Empty rev and rev_key tables. Register updated modstamp.
Returns t.
-
commit_rev(user text) RETURNS boolean
Call as user lexdb.
Update public schema with contents of rev and rev_key. Register updated modstamp.
Does NOT empty contents of rev and rev_key. Call clear_rev() as standard user to do this.
Returns t.
-
complete(field text, val text) RETURNS SETOF text
Returns possible completions of val amongst values taken by field in table lex.
-
current_timestamp() RETURNS text Returns current timestamp.
-
db_owner() RETURNS text
Returns name of database owner (default lexdb).
-
dump_public_rev_rev_key_to_tmp_tmp_key() RETURNS boolean
Places sorted copy of rev table in tmp. Places sorted copy of rev_key in tmp_key. These tables may then be accessed by the client (and placed in a file on client's local filesystem).
Returns t.
-
filter() RETURNS text
Returns filter of user (stored in meta table).
-
initialize_user_schema() RETURNS boolean
Creates and initializes private schema for user. Registers schema in public.meta.
Returns t if a new schema is created. If the schema already exists, or is the user is the database owner (lexdb), returns f.
-
lex_id_set() RETURNS SETOF text
Returns set of name field values in lex table.
-
lexdb_version() RETURNS text
Returns lexdb_version from meta table.
-
list_fld() RETURNS SETOF text
Returns (ordered) field names for rev tables.
Returns set of name for records in which field has value val.
Returns set of name for records in which field is null.
Call as database owner.Tables tmp_dfn must contain dfn entries to be merged.
Returns number of new entries.
Call as database owner. Tables tmp and tmp_key must contain rev and rev_key entries to be merged.
Updates rev/rev_key tables to include all entries in tmp/tmp_key fields. Register updated modstamp.
Returns number of new entries.
Updates modstamp.
Returns current timestamp.
Returns contents of lex.
Returns entries in lex for with corresponding key in table rev_key.
Returns entries in lex matching name.
Returns contents of rev table.
Returns contents of corresponding table.
Returns psql database internal field definitions for schema.table.
Returns f if rev_key is empty.
Returns contents of rev_new table. This table is populated with new entries merged on calling the function merge_public_rev_rev_key_from_tmp_tmp_key().
Returns set of entries in lex for which entries in the semi_... tables are either stale or do not exist.
Set up the semi_... tables.
Returns t if all entries in the semi_... tables are up to date.
Home | Forum | Discussions | Events