pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14187: Function is running correct but not showing output
2+ messages / 2 participants
[nested] [flat]
* BUG #14187: Function is running correct but not showing output
@ 2016-06-14 09:07 zzia88@gmail.com
2016-06-14 15:02 ` Re: BUG #14187: Function is running correct but not showing output David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: zzia88@gmail.com @ 2016-06-14 09:07 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14187
Logged by: Zubair Alam
Email address: zzia88@gmail.com
PostgreSQL version: 9.5.3
Operating system: windows7-x64(64 bit)
Description:
CREATE OR REPLACE FUNCTION FactTest(IN v1 integer,OUT FACT integer)
RETURNS integer AS
$BODY$
DECLARE
FACT INTEGER:=1;
BEGIN
FOR MyiNDEX IN REVERSE 1..FACT LOOP
FACT:=FACT*MyINDEX;
END LOOP;
END;
$BODY$
LANGUAGE plpgsql;
This function is running correct but not showing output
i am running this program on local host
Please run this code on your system correct the bug, then send me report of
this program and give me instructions how i have to solve this issue.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14187: Function is running correct but not showing output
2016-06-14 09:07 BUG #14187: Function is running correct but not showing output zzia88@gmail.com
@ 2016-06-14 15:02 ` David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2016-06-14 15:02 UTC (permalink / raw)
To: zzia88@gmail.com; +Cc: pgsql-bugs
On Tue, Jun 14, 2016 at 5:07 AM, <zzia88@gmail.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14187
> Logged by: Zubair Alam
> Email address: zzia88@gmail.com
> PostgreSQL version: 9.5.3
> Operating system: windows7-x64(64 bit)
> Description:
>
> CREATE OR REPLACE FUNCTION FactTest(IN v1 integer,OUT FACT integer)
> RETURNS integer AS
> $BODY$
> DECLARE
> FACT INTEGER:=1;
> BEGIN
> FOR MyiNDEX IN REVERSE 1..FACT LOOP
> FACT:=FACT*MyINDEX;
> END LOOP;
> END;
> $BODY$
> LANGUAGE plpgsql;
>
>
> This function is running correct but not showing output
>
> i am running this program on local host
> Please run this code on your system correct the bug, then send me report
> of
> this program and give me instructions how i have to solve this issue.
>
This is a list for reporting bugs in the basic operation of PostgreSQL -
not user errors. pgsql-general is the correct place for the later.
Tom already gave you many pieces of advice on this function on a separate
thread. The documentation provides the answer to (I think) the remaining
item.
https://www.postgresql.org/docs/9.6/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURN...
"""
If you declared the function with output parameters, write just RETURN
with no expression. The current values of the output parameter variables
will be returned.
"""
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-06-14 15:02 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14 09:07 BUG #14187: Function is running correct but not showing output zzia88@gmail.com
2016-06-14 15:02 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox