EnterpriseDB Advanced Server: A Primer
Oracle Tips by
EnterpriseDB Advanced Server offers you a choice of languages. There
are many optional languages available and EnterpriseDB Advanced Server
ships with PL/pgSQL (the PostgreSQL procedural language) and with the
EnterpriseDB Superset Procedural Language (SPL). This chapter will
concentrate on SPL but will briefly cover PL/pgSQL and a couple of the
optional languages, PL/TCL and PL/Perl.
SPL has as its
roots Pascal, ADA and Oracle's PL/SQL. SPL is a 3GL with 4GL-ish
capabilities. It is a language with a low learning curve to get
started but that can be extended to take you anywhere you need to go.
If you are
experienced in PL/SQL, you will jump into SPL with little to no
learning curve. If you are experienced in PostgreSQL PL/pgSQL,
Pascal, Delphi or ADA, you will be able to be productive very
quickly. If you are coming from a C or Java type background, the
curve may be a little steeper than a Wirth style language but still
not difficult. As a matter of a fact, if you have no programming
experience at all, SPL is an excellent learning ground.
SPL makes use
of many best practices such as modularity, information hiding,
encapsulation, reuse, exception handling, and more. SPL, like any
other robust language, will allow you to write bad code. No language
can protect you from yourself. SPL does give you all the tools to
quickly write solid, stable code. All you need to know is what
features the language makes available.
concentrates mainly on SPL. I will walk through many of the details
of this robust language and create some example code that will help
explain the uses of SPL and I will try to show some best practices in
EnterpriseDB Advanced Server is not restricted to SPL. If you are
familiar with PL/pgSQL, you can continue using that language. The
same goes for the other supported PostgreSQL languages. I will not
cover every language that PostgreSQL supports. I will briefly cover
how you can take advantage of the other languages to make your life
SPL is highly
compatible with Oracle's PL/SQL. As we work through this primer on
SPL, I will point out where SPL differs from PL/SQL. In later
chapters, I will explain how to design and code your applications so
that you can maintain compatibility between EnterpriseDB Advanced
Server and Oracle. In my opinion, the ability to run your
applications on both platforms gives you, and your business, the best
bang for your buck for what both EnterpriseDB and Oracle offers.
Unlike Oracle's PL/SQL, SPL is not pre-compiled. The text of your
procedures and functions are parsed and stored but the actual
compilation is not done until runtime. To improve performance, the
compiled version, and the plans for the SQL inside are cached for
is an excerpt from the book "EnterpriseDB:
The Definitive Reference" by Rampant TechPress.