Pradeepkumar, Pyatalo (IE10) wrote:
Well this is right for the local variablesbut what about the function
parameters. Okay, I will make it more simplesay I want to write a
function like this
CREATE FUNCTION test(integer,integer) RETURNS INTEGER AS '
DECLARE
param1 ALIAS FOR $1;
param2
Hi,
Quote from Section 37.11 of the manual:
# There are no default values for parameters in PostgreSQL.
# You can overload function names in PostgreSQL. This is often used
to work around the lack of default parameters.
So for your example:
> CREATE FUNCTION test(integer,integer) RETURNS INTEG
--
From: V i s h a l Kashyap @ [Sai Hertz And Control Systems]
[mailto:[EMAIL PROTECTED]
Sent: Monday, June 21, 2004 3:12 PM
To: Pradeepkumar, Pyatalo (IE10)
Cc: [EMAIL PROTECTED]
Subject: Re: [SQL] Function Parameters - need help !!!
Dear Pradeep ,
>CREATE PROC PP_ReadPointByValue
>@Sessi
Dear Pradeep ,
CREATE PROC PP_ReadPointByValue
@SessionID int = NULL, --these r default parameters
SessionID INT := NULL;
@SPSID int = 1,--default value
SPSID int := 1 ;
@ParameterName nvarchar (50) = NULL, -- if NULL read all parameters
ParameterName varchar(50) := NULL ;
@NumValue real
Hi all,
I am a new joinee to this mailing list. I am using PostgreSql for my
project. We are trying to port a few stored procedures written in SQL to
PGSQL. But i am finding difficulties in doing that. I m new to
Postgresqldont know much about it. I tried a lot of books and online
documents..