BUG #14187: Function is running correct but not showing output
BUG #14187: Function is running correct but not showing output
От:
zzia88@gmail.com
Дата:
VGhlIGZvbGxvd2luZyBidWcgaGFzIGJlZW4gbG9nZ2VkIG9uIHRoZSB3ZWJz aXRlOgoKQnVnIHJlZmVyZW5jZTogICAgICAxNDE4NwpMb2dnZWQgYnk6ICAg ICAgICAgIFp1YmFpciBBbGFtCkVtYWlsIGFkZHJlc3M6ICAgICAgenppYTg4 QGdtYWlsLmNvbQpQb3N0Z3JlU1FMIHZlcnNpb246IDkuNS4zCk9wZXJhdGlu ZyBzeXN0ZW06ICAgd2luZG93czcteDY0KDY0IGJpdCkKRGVzY3JpcHRpb246 ICAgICAgICAKCkNSRUFURSBPUiBSRVBMQUNFIEZVTkNUSU9OIEZhY3RUZXN0 KElOIHYxIGludGVnZXIsT1VUIEZBQ1QgaW50ZWdlcikNClJFVFVSTlMgaW50 ZWdlciBBUw0KJEJPRFkkDQoJREVDTEFSRSANCgkJRkFDVCBJTlRFR0VSOj0x Ow0KCUJFR0lODQoJCUZPUiBNeWlOREVYIElOIFJFVkVSU0UgMS4uRkFDVAlM T09QDQoJCUZBQ1Q6PUZBQ1QqTXlJTkRFWDsNCgkJRU5EIExPT1A7DQoJRU5E Ow0KJEJPRFkkDQpMQU5HVUFHRSBwbHBnc3FsOw0KDQoNClRoaXMgZnVuY3Rp b24gaXMgcnVubmluZyBjb3JyZWN0IGJ1dCBub3Qgc2hvd2luZyBvdXRwdXQN Cg0KaSBhbSBydW5uaW5nIHRoaXMgcHJvZ3JhbSBvbiBsb2NhbCBob3N0DQog UGxlYXNlIHJ1biB0aGlzIGNvZGUgb24geW91ciBzeXN0ZW0gY29ycmVjdCB0 aGUgYnVnLCB0aGVuIHNlbmQgbWUgcmVwb3J0IG9mCnRoaXMgcHJvZ3JhbSBh bmQgZ2l2ZSBtZSBpbnN0cnVjdGlvbnMgaG93IGkgaGF2ZSB0byBzb2x2ZSB0 aGlzIGlzc3VlLg0KCgo=
Re: BUG #14187: Function is running correct but not showing output
От:
"David G. Johnston" <david.g.johnston@gmail.com>
Дата:
On Tue, Jun 14, 2016 at 5:07 AM, 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:=3D1; > BEGIN > FOR MyiNDEX IN REVERSE 1..FACT LOOP > FACT:=3DFACT*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. > =E2=80=8BThis is a list for reporting bugs in the basic operation of Postgr= eSQL - 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-RETURNING ""=E2=80=8B" =E2=80=8BIf you declared the function with output parameters, write just RE= TURN with no expression. The current values of the output parameter variables will be returned. """ =E2=80=8BDavid J.