On Mon, 22 Sep 2003 [EMAIL PROTECTED] wrote:
> >You do realize that the shell is going to interpret that string in
> >double quotes right?
> I guess so, for the very same I have tried with
> Command: psql test -c "> CREATE FUNCTION add_one (integer) RETURNS
> INTEGER AS ' BEGIN RETUR
On Mon, 2003-09-22 at 06:42, [EMAIL PROTECTED] wrote:
> >You do realize that the shell is going to interpret that string in
> >double quotes right?
> I guess so, for the very same I have tried with
> Command: psql test -c "> CREATE FUNCTION add_one (integer) RETURNS
> INTEGER AS ' BEGIN
>You do realize that the shell is going to interpret that string in
>double quotes right?
I guess so, for the very same I have tried with
Command: psql test -c "> CREATE FUNCTION add_one (integer) RETURNS
INTEGER AS ' BEGIN RETURN ''$1'' + 1; END; ' LANGUAGE
'plpgsql';"
But still
On Mon, 22 Sep 2003 [EMAIL PROTECTED] wrote:
> Command: psql test -c "> CREATE FUNCTION add_one (integer) RETURNS
> INTEGER AS ' BEGIN REURN $1 + 1; END; ' LANGUAGE
> 'plpgsql';"
You do realize that the shell is going to interpret that string in
double quotes right?
---
Command: psql test -c "> CREATE FUNCTION add_one (integer) RETURNS INTEGER AS '
BEGIN REURN $1 + 1; END; ' LANGUAGE 'plpgsql';"
Result: CREATE FUNCTION
And the function executed perfectly fine.
-
Warm Regards
Shÿam Peri
II Floor, Punja Building,
M.G.Road,
Ballalbagh,
Mangalor
On Mon, 22 Sep 2003 [EMAIL PROTECTED] wrote:
> Dear all,
> This is about the same problem which I have been facing for the past one week and
> which I am unable to solve.
> I have create a function which return +1 of the argument passed.
> Function Definition:
> CREATE FUNCTION add_one (integer)
[EMAIL PROTECTED] writes:
> CREATE FUNCTION add_one (integer) RETURNS INTEGER AS '
> BEGIN
> RETURN $1 + 1;
> END;
> ' LANGUAGE 'plpgsql';
> The expected ouput of the above function should be 11 when we pass the 10 t=
> o it but it returns 1.
Works fine for me:
regression=# CR
5:08p
Dear All,
When I am executing any function with parameter.. I am unable to access them. So, I
would be thankful if, anyone can help me in teaching this aspect.
CREATE FUNCTION add_one (integer) RETURNS INTEGER AS '
BEGIN
RETURN $1 + 1;
END;
' LANGUAGE 'plpgsql';
The expected
[EMAIL PROTECTED] a écrit :
Hey,
create or replace function sample(varchar,int) returns varchar as'
declare
data alias for $1;
size alias for $2;
begin
return substr(data,(length(data)-size)+1,length(data));
end;
' language 'plpgsql';
WARNING: pl