Re: Setof-returning function create script bug

From: Nikolai Zhubr <n-a-zhubr(at)yandex(dot)ru>
To: pgadmin-support(at)postgresql(dot)org
Subject: Re: Setof-returning function create script bug
Date: 2015-11-27 09:12:21
Message-ID: 56581E75.8080109@yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Sven 2015-11-27 09:23:42 Re: SSH tunnel key exchange methods
Previous Message Dave Page 2015-11-27 09:02:04 Re: Greenplum warning message