Hello pgAdmin III list,
Recently, I found that Default Values of Function Arguments are garbled if they
contain unquoted commas. This happens in the Function Property Dialog as well
as using the CREATE script menu item.
1. Example, where Default is garbled:----CREATE OR REPLACE FUNCTION blah(foo
integer[] DEFAULT ARRAY[1, 2, 3]) RETURNS integer AS $BODY$
SELECT 1;
$BODY$
LANGUAGE sql STABLE;
----#### CREATE script menu item produces:CREATE OR REPLACE FUNCTION blah(foo
integer[] DEFAULT ARRAY[1)
RETURNS integer AS
$BODY$
SELECT 1;
$BODY$
LANGUAGE sql STABLE
COST 100;
2. Example, where Default is left intact:----CREATE OR REPLACE FUNCTION
blub(bar integer[] DEFAULT '{1,2,3}'::integer[])
RETURNS integer AS $BODY$
SELECT 1;
$BODY$
LANGUAGE sql STABLE;
----#### CREATE script menu item produces:CREATE OR REPLACE FUNCTION blub(bar
integer[] DEFAULT '{1,2,3}'::integer[])
RETURNS integer AS
$BODY$
SELECT 1;
$BODY$
LANGUAGE sql STABLE
COST 100;
3. Fortunately, the psql command \sf works correctly and reproduces these
functions as shown above in the first place.
I did my test with the Windows Program pgAdmin Version 1.22.0 (Jan 8 2016,
rev:REL-1_22_0) under Windows 7 64bit.
Please fix this bug.
Happy computing...Frank