Stored Procedures - Mailing list pgsql-novice

From bugbug@shaw.ca
Subject Stored Procedures
Date
Msg-id beab9be333.be333beab9@shaw.ca
Whole thread Raw
Responses Re: Stored Procedures
Re: Stored Procedures
List pgsql-novice
Hi Im new to postgre...and Im trying to make the leap from ms sql(was kinda new there too! )

How do I implement ms sql style stored procedures in postgre ? I have ms sql stored procedures like the following to
insertdata into a db that is called from a web form: 

CREATE PROCEDURE pr_Wellogs_Insert
 @iWELL_NUM int = NULL,
 @sOWNER nvarchar(60) = NULL,
 @siWELL_LOT smallint = NULL,
 @stFrom smallint = NULL,
 @stTO smallint = NULL

AS

INSERT WELLOGS
(
 [WELL_NUM],
 [OWNER],
 [WELL_LOT]
)
VALUES
(
 @iWELL_NUM,
 @sOWNER,
 @siWELL_LOT

if (@stFrom <> ' ')
begin insert stratigraphy3
(
 [well_num],
 [from],
 [to]
)
values
(
 @iWELL_NUM,
 @stFrom,
 @stTO
)
end
return

------
In pgadmin I cant even find anything called stored procedures. Also...how do I implement @@identity in postgre ?

Thanks!
Dennis


pgsql-novice by date:

Previous
From: Don Patou
Date:
Subject: looking for a script to compare databases
Next
From: Josh Berkus
Date:
Subject: Re: Stored Procedures