On Thursday 10 January 2002 1:12 pm, Chris Bond wrote:
> > I don't know what you mean by 'Stored Procedures', but PostgreSQL does
> > support server run procedures in PL/SQL, tcl, C, perl and maybe others
>
> that
>
> > run inside the server, and can be called directly in SQL or can be called
>
> as
>
> > triggers. I've had a little look at it and it does look good.
>
> A Stored Procedure is a microsoft thing, its a server side procedure that
> can be cached for permformance reasons - heres an example:
>
> CREATE PROCEDURE GetClientList
> @Search varchar(10)
> As
> Select * From client Where cliname = @Search + '%'
>
> At the moment its what sets microsoft apart from anything else, you can use
> any TSQL in here so you can do server side cursors and even more complex
> things. More and more windows programmers are using the features in mssql
> espcially with the release of .NET. All we need is for postgres/mysql etc
> to support this subset.
>
> Kind Regards,
> Chris Bond
Hi Chris,
below is an example of the functions I've written - it's the first one I
found and not one of my best.
One thing I didn't mention in my 1st post was that you can write the
functions in SQL. Does anyone have a referece comparing stored procedures on
different platforms?
Also, within the next 12 months, we will be looking to start writing version
2 of our in-house management system, moveing from COBOL to some form of
database with multiple front ends - console based as at the moment, web
based, and client-server based with front ends written in Kylix/Delphi.
While I have had some (not much) experience with PostgreSQL, I've had no
experience with any other DBMS (I had a nightmare period of using Paradox
tables with Delphi over MS network shared drives). My boss is looking at
Oracle, and I would be interested in peoples opinions.
We have currently 120 people who use the system, 50% constantly, the rest
varying between 10% and 50% of their working day. We have about 4GB working
data and about the same again in archives. The users are currently spread
over two sites with a 128K leased line between.
CREATE FUNCTION "getteamno" (integer) RETURNS character varying AS '
DECLARE
unitno varchar;
BEGIN
select into unitno
tregion || ''/'' ||
to_char(tnumber,''FM000'')
from teams
where tid = $1;
if not found then
raise exception ''Team % not found'',$1;
return '''';
end if;
return unitno;
END;
' LANGUAGE 'plpgsql';
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list