Re: Languages and Functions - Mailing list pgsql-general

From Richard Huxton
Subject Re: Languages and Functions
Date
Msg-id 465C481B.1010203@archonet.com
Whole thread Raw
In response to Languages and Functions  ("Robert James" <srobertjames@gmail.com>)
Responses Re: Languages and Functions
List pgsql-general
Robert James wrote:
> 1. How can I get a list of available functions (ie, user defined or
> contrib)
> using SQL?

To see how PG does it:
   psql -E
   \df

> 2. Is there any performance or other advantage to using PL/pgsql over
> Pl/Perl or Python?

1. It's more likely to be available (not relevant if you set up the
system yourself).
2. It's probably more tested (because it's more available, not through
any failing of the other languages)
3. I'd guess for a small function, called for the first time in this
session you'd avoid any startup costs for the perl interpreter
4. It uses the same code as the SQL engine to handle expressions, so
there's no conflict between understanding of how floating-point or
timestamps should behave in corner cases.

Against it is the fact that it's statically typed and fairly inelegant.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Languages and Functions
Next
From: Rich Shepard
Date:
Subject: Re: Rookie Questions: Storing the results of calculations vs. not?