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

From: Frank Limpert <frank_limpert(at)yahoo(dot)com>
To: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Default Values of Function Arguments are garbled if they contain a comma
Date: 2016-03-08 14:41:21
Message-ID: 1096511243.4605225.1457448081689.JavaMail.yahoo@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgadmin-support by date

  From Date Subject
Next Message Wyatt Sanford 2016-03-08 17:56:06 How to setup Active Directory users in Postgres 9.3.11
Previous Message johannes graën 2016-03-06 17:35:00 Re: Copy & paste key commands not working correctly