Book Image

PostgreSQL Server Programming - Second Edition

Book Image

PostgreSQL Server Programming - Second Edition

Overview of this book

Table of Contents (21 chapters)
PostgreSQL Server Programming Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 12. PL/Tcl – Tcl Procedural Language

Tools Command Language (Tcl), also commonly known as tickle, has been around for a long time. It was created by John Ousterhout in 1988 and got a lot of traction for rapid prototyping and scripted applications.

In this chapter, we will take a brief look at PL/Tcl. Between PL/Perl, PL/Python, and PL/pgSQL, you have very powerful languages available at your disposal that can do almost anything you need. For some other things, you have the option to write your functions in C. You might wonder why it is useful to discuss PL/Tcl. For a long time, in the early days of PostgreSQL, PL/Tclu (untrusted PL/Tcl) was the only way to do things outside PostgreSQL, such as interacting with the operating system. A lot of people still use it, and I personally think that it is so clean and powerful that it should not be overlooked.

PL/Tcl is available as a trusted and an untrusted language. This is achieved by providing two different Tcl interpreters. PL/Tclu uses...