Default Values of Function Arguments are garbled if they contain a comma

Поиск
Список
Период
Сортировка
От Frank Limpert
Тема Default Values of Function Arguments are garbled if they contain a comma
Дата
Msg-id 1096511243.4605225.1457448081689.JavaMail.yahoo@mail.yahoo.com
обсуждение исходный текст
Список pgadmin-support
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

В списке pgadmin-support по дате отправления: