Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aij6N-0004zm-Fm for pgadmin-hackers@arkaria.postgresql.org; Wed, 23 Mar 2016 13:45:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aij6L-0002YQ-Us for pgadmin-hackers@arkaria.postgresql.org; Wed, 23 Mar 2016 13:45:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aij66-0002JY-AU for pgadmin-hackers@postgresql.org; Wed, 23 Mar 2016 13:45:18 +0000 Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1aij5t-0001Ft-7b for pgadmin-hackers@postgresql.org; Wed, 23 Mar 2016 13:45:17 +0000 Received: by mail-lf0-x22f.google.com with SMTP id d82so11941337lfe.3 for ; Wed, 23 Mar 2016 06:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=RjRCPuBrVJgv7vojS9C/t+fMKs12RG24VEACklUl8R0=; b=1Vp4xqzwmEC+MvXfHgAVzCewsrC3DvU7e9s3GoiaOc0hBQUDaooUgQbv1Ebjc9WCrD +H6fVZBMETbdz73aS+q4DR9f1dfPP9ZR2OBq8wiypMKRdVUrkG5/7OTiXiTXQGycR+jn 9zcYPrtxjgt23WfjxE2LzlalswNxqacCGXowVsalMVd7JlgkaRIAl/OXhVBbIQCEtwTN /7jghWkMgVQK6qKeI53wz5WhQvfISvqRoNRfIX9zuCVVtH0V3NOKe37DwMaKn3fbuT72 ohRC6OzS1+isiLY9k/pNKKL7OY8nP2Xz5ltlVT5R2umnvdHKCIoFuakSp1fcuoef+yMj E8LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=RjRCPuBrVJgv7vojS9C/t+fMKs12RG24VEACklUl8R0=; b=SeK8RqtajFFbXkAUzq6u3nktwEjoDNribmn6haV4fQMtXVC+Umb9MzK8eLYG7BXIF2 mcZfQkJBQmWPvtJ2a5ityvx7XMMadkFySXK9xdwCz3WxE9SlS9+mLzrhciAiHqqiH6ZJ OS7UUnoVPgDGfAxJjNctu8yIqkzNhWDTONpKJp1q+6Ckj4nLX6TPKDHsL85v1qrW+IDm 7upZLYOxAvQG0B/wN9aPsgnYaoPfrF1wfIyovDDBfGiGAjI/JPoD8cbswS42kAcNtLL3 SjNLkHOU+RFWxeU8CjFXVfdGiLUaWnsHXAsC/LZW9GX6ED94RhZjIfNjGEShFv5l7q3r 4Lag== X-Gm-Message-State: AD7BkJLQtStyGaZhycf96NJ0aFl5A97E5tCZ2IPvpkzYdUDc9ZVUbpvqwF3i9h/o3iA87ibINM0L3puL58uud+UJ MIME-Version: 1.0 X-Received: by 10.25.150.207 with SMTP id y198mr1335137lfd.68.1458740696417; Wed, 23 Mar 2016 06:44:56 -0700 (PDT) Received: by 10.25.159.85 with HTTP; Wed, 23 Mar 2016 06:44:56 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Mar 2016 19:14:56 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: Functions/Procedures Module From: Khushboo Vashi To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a11401cb2079ba8052eb78956 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a11401cb2079ba8052eb78956 Content-Type: text/plain; charset=UTF-8 Hi Dave, I think you forgot to attach the updated patch. Thanks, Khushboo On Wed, Mar 23, 2016 at 5:33 PM, Dave Page wrote: > On Tue, Mar 22, 2016 at 10:51 AM, Khushboo Vashi > wrote: > > Hi, > > > > Please find updated Patch for the Functions/Procedures Module. > > Hi > > Unfortunately I found more issues as I tested in-depth. I've attached > an updated patch in which I've done some cleanup - additional comments > below: > > - Some argument lists are shown with an extra space, e.g. > > character varying , integer > > (pem.create_agent(character varying , integer)) > > - A 404 error is seen when functions are selected under a Catalog node. > > - Procedures have a property of "System function?" - should be "System > procedure?" > > - The Return Type, Returns a Set and Window fields should be hidden > for Procedures. > > - When creating a procedure (below), I get the following error: > > ----- > -- PROCEDURE: foo > > -- DROP PROCEDURE foo; > > CREATE OR REPLACE PROCEDURE public.foo(IN a integer DEFAULT 10, INOUT > b integer DEFAULT -) > VOLATILE NOT LEAKPROOF SECURITY DEFINER > COST 100.0 > AS > > BEGIN > b:=a+b+1; > END; > > COMMENT ON PROCEDURE public.foo > IS 'Foo procedure'; > ----- > > ----- > 2016-03-23 11:22:02,186: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016 > 11:22:02] "GET /browser/procedure/obj/1/2/14844/13627/16387 HTTP/1.1" > 500 - > Traceback (most recent call last): > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1836, in __call__ > return self.wsgi_app(environ, start_response) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1820, in wsgi_app > response = self.make_response(self.handle_exception(e)) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1403, in handle_exception > reraise(exc_type, exc_value, tb) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1817, in wsgi_app > response = self.full_dispatch_request() > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1477, in full_dispatch_request > rv = self.handle_user_exception(e) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1381, in handle_user_exception > reraise(exc_type, exc_value, tb) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1475, in full_dispatch_request > rv = self.dispatch_request() > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1461, in dispatch_request > return self.view_functions[rule.endpoint](**req.view_args) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py", > line 84, in view > return self.dispatch_request(*args, **kwargs) > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line > 233, in dispatch_request > return method(*args, **kwargs) > File > "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py", > line 349, in wrap > return f(*args, **kwargs) > File > "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py", > line 425, in properties > resp_data = self._fetch_properties(gid, sid, did, scid, fnid) > File > "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py", > line 1097, in _fetch_properties > resp_data = res['rows'][0] > IndexError: list index out of range > ----- > > - After a Python server reset, I get the following error when trying > to view SQL of a Procedure (seems like it thinks it's connected to > PG?): > > TemplateNotFound: procedure/pg/sql/9.5_plus/node.sql > 2016-03-23 11:28:52,852: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016 > 11:28:52] "GET /browser/procedure/nodes/1/2/14844/2200/ HTTP/1.1" 500 > - > Traceback (most recent call last): > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1836, in __call__ > return self.wsgi_app(environ, start_response) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1820, in wsgi_app > response = self.make_response(self.handle_exception(e)) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1403, in handle_exception > reraise(exc_type, exc_value, tb) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1817, in wsgi_app > response = self.full_dispatch_request() > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1477, in full_dispatch_request > rv = self.handle_user_exception(e) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1381, in handle_user_exception > reraise(exc_type, exc_value, tb) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1475, in full_dispatch_request > rv = self.dispatch_request() > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", > line 1461, in dispatch_request > return self.view_functions[rule.endpoint](**req.view_args) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py", > line 84, in view > return self.dispatch_request(*args, **kwargs) > File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line > 233, in dispatch_request > return method(*args, **kwargs) > File > "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py", > line 349, in wrap > return f(*args, **kwargs) > File > "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py", > line 390, in nodes > 'node.sql']), scid=scid) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/templating.py", > line 127, in render_template > return > _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list), > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/jinja2/environment.py", > line 830, in get_or_select_template > return self.get_template(template_name_or_list, parent, globals) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/jinja2/environment.py", > line 791, in get_template > return self._load_template(name, self.make_globals(globals)) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/jinja2/environment.py", > line 765, in _load_template > template = self.loader.load(self, name, globals) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/jinja2/loaders.py", > line 113, in load > source, filename, uptodate = self.get_source(environment, name) > File > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/templating.py", > line 64, in get_source > raise TemplateNotFound(template) > TemplateNotFound: procedure/pg/sql/9.5_plus/node.sql > 2016-03-23 11:28:57,953: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016 > 11:28:57] "POST /ping HTTP/1.1" 200 - > > - Procedures do not include the schema name in the headers of reverse > engineered SQL, e.g. > > - What's the trailing - in the parameter list in this reverse engineered > SQL? > > -- PROCEDURE: foo > > -- DROP PROCEDURE foo; > > CREATE OR REPLACE PROCEDURE public.foo(IN a integer DEFAULT 10, INOUT > b integer DEFAULT -) > VOLATILE NOT LEAKPROOF SECURITY DEFINER > COST 100.0 > AS > > BEGIN > b:=a+b+1; > END; > > COMMENT ON PROCEDURE public.foo > IS 'Foo procedure'; > > Thanks! > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --001a11401cb2079ba8052eb78956 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Dave,

I think you forgot to= attach the updated patch.

Thanks,
Khushboo
=

On Wed, Mar 23, 2= 016 at 5:33 PM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Mar 22, 2016 at 10:51 AM, Khushboo Vashi=
<khushboo.vashi@enter= prisedb.com> wrote:
> Hi,
>
> Please find updated Patch for the Functions/Procedure= s Module.

Hi

Unfortunately I found more issues as I tested in-depth. I've attached an updated patch in which I've done some cleanup - additional comments<= br> below:

- Some argument lists are shown with an extra space, e.g.

character varying , integer

(pem.create_agent(character varying , integer))

- A 404 error is seen when functions are selected under a Catalog node.

- Procedures have a property of "System function?" - should be &q= uot;System
procedure?"

- The Return Type, Returns a Set and Window fields should be hidden
for Procedures.

- When creating a procedure (below), I get the following error:

-----
-- PROCEDURE: foo

-- DROP PROCEDURE foo;

CREATE OR REPLACE PROCEDURE public.foo(IN a integer DEFAULT 10, INOUT
b integer DEFAULT=C2=A0 -)
=C2=A0 =C2=A0 VOLATILE NOT LEAKPROOF SECURITY DEFINER
=C2=A0 =C2=A0 COST 100.0
AS

BEGIN
=C2=A0 =C2=A0b:=3Da+b+1;
END;

COMMENT ON PROCEDURE public.foo
=C2=A0 =C2=A0 IS 'Foo procedure';
-----

-----
2016-03-23 11:22:02,186: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016
11:22:02] "GET /browser/procedure/obj/1/2/14844/13627/16387 HTTP/1.1&q= uot;
500 -
Traceback (most recent call last):
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1836, in __call__
=C2=A0 =C2=A0 return self.wsgi_app(environ, start_response)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1820, in wsgi_app
=C2=A0 =C2=A0 response =3D self.make_response(self.handle_exception(e))
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1403, in handle_exception
=C2=A0 =C2=A0 reraise(exc_type, exc_value, tb)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1817, in wsgi_app
=C2=A0 =C2=A0 response =3D self.full_dispatch_request()
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1477, in full_dispatch_request
=C2=A0 =C2=A0 rv =3D self.handle_user_exception(e)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1381, in handle_user_exception
=C2=A0 =C2=A0 reraise(exc_type, exc_value, tb)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1475, in full_dispatch_request
=C2=A0 =C2=A0 rv =3D self.dispatch_request()
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1461, in dispatch_request
=C2=A0 =C2=A0 return self.view_functions[rule.endpoint](**req.view_args) =C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/views.py",
line 84, in view
=C2=A0 =C2=A0 return self.dispatch_request(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py&qu= ot;, line
233, in dispatch_request
=C2=A0 =C2=A0 return method(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_grou= ps/servers/databases/schemas/functions/__init__.py",
line 349, in wrap
=C2=A0 =C2=A0 return f(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_grou= ps/servers/databases/schemas/functions/__init__.py",
line 425, in properties
=C2=A0 =C2=A0 resp_data =3D self._fetch_properties(gid, sid, did, scid, fni= d)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_grou= ps/servers/databases/schemas/functions/__init__.py",
line 1097, in _fetch_properties
=C2=A0 =C2=A0 resp_data =3D res['rows'][0]
IndexError: list index out of range
-----

- After a Python server reset, I get the following error when trying
to view SQL of a Procedure (seems like it thinks it's connected to
PG?):

TemplateNotFound: procedure/pg/sql/9.5_plus/node.sql
2016-03-23 11:28:52,852: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016
11:28:52] "GET /browser/procedure/nodes/1/2/14844/2200/ HTTP/1.1"= 500
-
Traceback (most recent call last):
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1836, in __call__
=C2=A0 =C2=A0 return self.wsgi_app(environ, start_response)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1820, in wsgi_app
=C2=A0 =C2=A0 response =3D self.make_response(self.handle_exception(e))
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1403, in handle_exception
=C2=A0 =C2=A0 reraise(exc_type, exc_value, tb)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1817, in wsgi_app
=C2=A0 =C2=A0 response =3D self.full_dispatch_request()
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1477, in full_dispatch_request
=C2=A0 =C2=A0 rv =3D self.handle_user_exception(e)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1381, in handle_user_exception
=C2=A0 =C2=A0 reraise(exc_type, exc_value, tb)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1475, in full_dispatch_request
=C2=A0 =C2=A0 rv =3D self.dispatch_request()
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/app.py",
line 1461, in dispatch_request
=C2=A0 =C2=A0 return self.view_functions[rule.endpoint](**req.view_args) =C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/views.py",
line 84, in view
=C2=A0 =C2=A0 return self.dispatch_request(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py&qu= ot;, line
233, in dispatch_request
=C2=A0 =C2=A0 return method(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_grou= ps/servers/databases/schemas/functions/__init__.py",
line 349, in wrap
=C2=A0 =C2=A0 return f(*args, **kwargs)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_grou= ps/servers/databases/schemas/functions/__init__.py",
line 390, in nodes
=C2=A0 =C2=A0 'node.sql']), scid=3Dscid)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/templating.py",
line 127, in render_template
=C2=A0 =C2=A0 return _render(ctx.app.jinja_env.get_or_select_template(templ= ate_name_or_list),
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/jinja2/environment.py",
line 830, in get_or_select_template
=C2=A0 =C2=A0 return self.get_template(template_name_or_list, parent, globa= ls)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/jinja2/environment.py",
line 791, in get_template
=C2=A0 =C2=A0 return self._load_template(name, self.make_globals(globals))<= br> =C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/jinja2/environment.py",
line 765, in _load_template
=C2=A0 =C2=A0 template =3D self.loader.load(self, name, globals)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/jinja2/loaders.py",
line 113, in load
=C2=A0 =C2=A0 source, filename, uptodate =3D self.get_source(environment, n= ame)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pac= kages/flask/templating.py",
line 64, in get_source
=C2=A0 =C2=A0 raise TemplateNotFound(template)
TemplateNotFound: procedure/pg/sql/9.5_plus/node.sql
2016-03-23 11:28:57,953: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016
11:28:57] "POST /ping HTTP/1.1" 200 -

- Procedures do not include the schema name in the headers of reverse
engineered SQL, e.g.

- What's the trailing - in the parameter list in this reverse engineere= d SQL?

-- PROCEDURE: foo

-- DROP PROCEDURE foo;

CREATE OR REPLACE PROCEDURE public.foo(IN a integer DEFAULT 10, INOUT
b integer DEFAULT=C2=A0 -)
=C2=A0 =C2=A0 VOLATILE NOT LEAKPROOF SECURITY DEFINER
=C2=A0 =C2=A0 COST 100.0
AS

BEGIN
=C2=A0 =C2=A0b:=3Da+b+1;
END;

COMMENT ON PROCEDURE public.foo
=C2=A0 =C2=A0 IS 'Foo procedure';

Thanks!

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--001a11401cb2079ba8052eb78956--