Skip to Main Content
Practical PostgreSQL
book

Practical PostgreSQL

by Joshua D. Drake, John C. Worsley
January 2002
Intermediate to advanced content levelIntermediate to advanced
640 pages
16h 39m
English
O'Reilly Media, Inc.
Content preview from Practical PostgreSQL

Create Language

Defines a new language to be used by functions.

Synopsis

CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE 'langname'
    HANDLER call_handler
    LANCOMPILER 'comment'

Parameters

TRUSTED

The TRUSTED keyword indicates that the PostgreSQL lets unprivileged users bypass user and permission-related access restrictions on the language. If this parameter is not specified during creation of the language, only database superusers will be able to use the language to create new functions.

PROCEDURAL

The optional PROCEDURAL noise term. This may be used to increase readability of your CREATE LANGUAGE statements, but has no effect.

langname

The name of the new procedural language to define. This name is case insensitive. A procedural language will not (and cannot) override an existing, builtin PostgreSQL language.

HANDLER call_handler

The name of the already-defined function that will be called to execute the PL procedures.

comment

A string that is inserted into the lancompiler column of the pg_language system table. The LANCOMPILER clause is a legacy clause with no practical effect, and may be removed in a future PostgreSQL release. However, as of version 7.1.x, this is still a required clause.

Results

CREATE

The message returned when a new language is successfully created.

ERROR: PL handler function call_handler( ) doesn't exist

The error returned if the function you specified as the call handler with call_handler parameter cannot be found.

Description

Use the CREATE LANGUAGE command to load a new procedural ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PostgreSQL: Up and Running, 2nd Edition

PostgreSQL: Up and Running, 2nd Edition

Regina O. Obe, Leo S. Hsu
Learning PostgreSQL 11 - Third Edition

Learning PostgreSQL 11 - Third Edition

Christopher Travers, Andrey Volkov
Learn PostgreSQL

Learn PostgreSQL

Luca Ferrari, Enrico Pirozzi
PostgreSQL 13 Cookbook

PostgreSQL 13 Cookbook

Vallarapu Naga Avinash Kumar

Publisher Resources

ISBN: 9781449309770Supplemental ContentErrata Page