2009/10/24 Bruno Baguette <bruno.baguette@xxxxxxxxx>: > Le 24/10/09 22:09, Pavel Stehule a écrit : >> >> you can use plperl or plpython for this task. >> >> Pavel > > re-Hello Pavel, > > I always used plpgsql because I *thought* it was the most powerfull > procedural language for stored procedures in PostgreSQL. plpgsql is best language for stored procedures, but simply it is not for all. There are some issue still, but some significant limits are removed in 8.4. > > The fact that PL/pgSQL is most documented than PL/Tcl and PL/Perl (and > PL/Python *seems* to have very poor documentation) has probably made me > wrong. > > Which one would you advise me to learn and use, instead of PL/pgSQL ? It depends on what you are know (if you known better perl or pthon). Usually I using mainly plpgsql and on some functions plperl and C. plpgsql is good language as glue of SQL statements, plperl is good for IO and CPAN libraries, and C should help with some processor intensive functions. > > Can you explain me why does PL/Perl and PL/Python can does this task (using > OLD in a dynamic query) where PL/pgSQL can't ? External procedures (like procedures in plperl or plpython) has not 100% integrated SQL. Next, SQL row is mapped to perl's array and it should be iterated. Plpgsql is similar to classic programming languages. In mostly older languages you cannot iterate over recordset.. plpgsql is static language like C, Pascal, ADA. Perl or Python are dynamic languages, so you can do some tasks very simple. And other not, because these languages are only on partially integrated with SQL. > > Once again, thanks a lot for your tips ! :-) with pleasure Pavel > > Kind regards, > > -- > Bruno Baguette - bruno.baguette@xxxxxxxxx > > -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general