Re: Setof-returning function create script bug - Mailing list pgadmin-support

From Nikolai Zhubr
Subject Re: Setof-returning function create script bug
Date
Msg-id 56581E75.8080109@yandex.ru
Whole thread Raw
In response to Setof-returning function create script bug  (Stefan Stefanov <stefanov.sm@abv.bg>)
List pgadmin-support
Hello Stefan,

this bug is (supposed to be) fixed in git, however beta1 binaries were 
released before the fix. Therefore, you can either wait for beta2 (or 
whatever release happens next), or rebuild new binaries yourself from 
git (although building windows binaries from scratch involves quite a 
lot of burden)

Regards,
Nikolai

26.11.2015 22:18, Stefan Stefanov:
> Dear Sir or Madam,
> I am writing to report a bug in pgadmin III 1.22.0-beta1 running on
> Windows 7 x64 connected to PostgreSQL 9.5beta2 64 bit.
> To reproduce the bug create this function using SQL query editor:
>
> create or replace function afunc() returns setof record as
> $$
> begin
> return next (1, 2, 3);
> return next (2, 3, 4);
> end;
> $$ language plpgsql;
>
> The function works fine when invoked with a query like this one
>
> select * from afunc() as x(a integer, b integer, c integer);
>
> However when the function is selected in Object browser this is what
> appears in the SQL pane:
>
> -- Function: public.afunc()
>
> -- DROP FUNCTION public.afunc();
>
> CREATE OR REPLACE FUNCTION public.afunc()
> RETURNS SETOF SETOF record AS
> $BODY$
> begin
> return next (1, 2, 3);
> return next (2,3,4);
> end;
> $BODY$
> LANGUAGE plpgsql VOLATILE
> COST 100
> ROWS 1000;
> ALTER FUNCTION public.afunc()
> OWNER TO postgres;
>
> There are two SETOF-s after the RETURNS declaration and this makes the
> code invalid. Rightclick-Scripts-Create script produces the same.
> The bug appeared on pgadmin III 1.18 running on windows xp connected to
> 32-bit Postgresql 9.2 as well.
> It is not really a show stopper yet annoying.
>
> Thank you for the great job you are doing.
> Sincerely, Stefan




pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: Greenplum warning message
Next
From: Sven
Date:
Subject: Re: SSH tunnel key exchange methods