Skip site navigation (1) Skip section navigation (2)

Re: PL/Pgsql or PL/Python?

From: Andrew Hammond <ahammond(at)ca(dot)afilias(dot)info>
To: Wolfgang Keller <wolfgang(dot)keller(dot)nospam(at)gmx(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: PL/Pgsql or PL/Python?
Date: 2005-02-28 02:38:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
This is a very vague question. I'd suggest it's worth learning pl/pgsql 
simply because it's designed to solve a set of problems common in 
database systems. The design makes it reasonably efficient for 
implementing solutions in this area.

The problem you're (just barely) describing below is something I'd 
probably try to address with pure sql stored procedures. Remember, the 
database already has numeric support capabilities. If you stick to pure 
sql procedures, not only do you remain portable, but you may be able to 
gain some wins in the planner.

I also suggest that if you're attempting to iterate in Python, then you 
might not be understanding how an integrated procedural language is 
intended to be used.


Wolfgang Keller wrote:
> Hello,
> I was wondering whether it is worth for me to learn PL/Pgsql, given the
> support of Python in Postgresql. The latter (Python) is the only
> programming language I've learned voluntarily in my whole life, i.e.
> without being obliged to do so, you know. ;-)
> So, what things can be done in PL/Pgsql which can't be done in PL/Python
> (and vice-versa)? And, how do both compare in terms of runtime efficiency
> (speed/memory)?
> Apart from typical "ERP-like" work, the applications I am planning to use
> Postgresql for involve storage and (numeric) processing of quite
> significant amounts of (binary) measurement data. Specifically, "hacking"
> long streams of binary data fed into a database in batch mode into
> individual OPC-conform triplets, among others. So I thought the numeric
> module and iterator feature in Python would be quite useful...
> TIA,
> Best regards
> Wolfgang Keller
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

In response to

pgsql-novice by date

Next:From: EnvbopDate: 2005-02-28 04:02:39
Subject: Database Name
Previous:From: Andrew HammondDate: 2005-02-28 02:28:17
Subject: Re: Import csv file into multiple tables in Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group