The world rejoiced as jinujosein@yahoo.com ("George A.J") wrote:
> i am converting an MSSQL database to Postgres. there is a lot of procedures to convert.
>
> which language is best for functions, SQL or plpgsql.
>
> which is faster . i am using postgres 7.3.2
Hmm? This doesn't seem to make much more sense than the question of
what colour a database should be ("Mauve has more RAM...").
SQL and pl/pgsql are quite distinct. If you have procedures that
require programmed logic, with things like variables and loops, SQL
generally cannot do that, and you will HAVE to use one of the embedded
languages.
If raw speed is at issue, it is quite likely that rewriting the
procedures in C would lead to code that is faster still.
But the real question is of what language you *need* to implement in.
For certain sorts of simple procedures, SQL may suffice; as complexity
grows, you will need to use one of the other languages, whether
plpgsql, plperl, plpython, C, C++, and such, and the question won't be
of speed; it will be of necessity.
--
output = ("cbbrowne" "@" "cbbrowne.com")
http://www.ntlug.org/~cbbrowne/linuxdistributions.html
Never hit someone head on, always sideswipe. Never say, "Foo's last
patch was brain-damaged", but rather, "While fixing the miscellaneous
bugs in 243.xyz [foo's patch], I found...."
-- from the Symbolics Guidelines for Sending Mail