| --- |
| title: pg_pltemplate |
| --- |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| The `pg_pltemplate` system catalog table stores template information for procedural languages. A template for a language allows the language to be created in a particular database by a simple `CREATE LANGUAGE` command, with no need to specify implementation details. Unlike most system catalogs, `pg_pltemplate` is shared across all databases of HAWQ system: there is only one copy of `pg_pltemplate` per system, not one per database. This allows the information to be accessible in each database as it is needed. |
| |
| There are not currently any commands that manipulate procedural language templates; to change the built-in information, a superuser must modify the table using ordinary `INSERT`, `DELETE`, or `UPDATE` commands. |
| |
| <a id="topic1__hf150092"></a> |
| <span class="tablecap">Table 1. pg\_catalog.pg\_pltemplate</span> |
| |
| | column | type | references | description | |
| |------------------|-------------|------------|-------------------------------------------------------| |
| | `tmplname` | name | | Name of the language this template is for | |
| | `tmpltrusted` | boolean | | True if language is considered trusted | |
| | `tmplhandler` | text | | Name of call handler function | |
| | `tmplvalidator ` | text | | Name of validator function, or `NULL` if none | |
| | `tmpllibrary` | text | | Path of shared library that implements language | |
| | `tmplacl` | aclitem\[\] | | Access privileges for template (not yet implemented). | |
| |
| |
| |