[GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hi, How can I store inline comments in the argument list of a plpgsql function to document complex overloaded functions with lots of arguments? It seems that PostgreSQL accepts the comments, but strips them as the function gets stored. I am using PostgreSQL 9.1.2. +++ CREATE FUNCTION

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Raymond O'Donnell
On 20/01/2012 17:28, Ralph Graulich wrote: Hi, How can I store inline comments in the argument list of a plpgsql function to document complex overloaded functions with lots of arguments? It seems that PostgreSQL accepts the comments, but strips them as the function gets stored. You could

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hello Ray, You could use COMMENT ON instead: COMMENT ON function func_test(text, text) IS 'loads of documentation here'; Would this do the job? Thank you for your input. I know about the COMMENT ON function, as I use it for all other purposes, like documenting columns and

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ralph Graulich Sent: Friday, January 20, 2012 12:28 PM To: pgsql-general@postgresql.org Subject: [GENERAL] comments in argument list of plpgsql get stripped? Hi, How can I

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hi David, The fact that you can write comments in the middle of the arguments in an artifact of the parser and likely there is not reasonable way to get them to persist. Artifact as in something not normally used? You either want to use COMMENT ON like Raymond said or you can simply move

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread David Johnston
[[[ My response embedded ]]] -Original Message- From: Ralph Graulich [mailto:maill...@shauny.de] Sent: Friday, January 20, 2012 3:24 PM To: David Johnston Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] comments in argument list of plpgsql get stripped? Hi David, The fact

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Adrian Klaver
On Friday, January 20, 2012 12:24:26 pm Ralph Graulich wrote: Hi David, II) Having PostgreSQL issuing a NOTICE that comments get stripped if you use comments somewhere where PostgreSQL accepts them, but discards them silently? I think that is covered by this:

Re: [GENERAL] comments in argument list of plpgsql get stripped?

2012-01-20 Thread Ralph Graulich
Hi Adrian, II) Having PostgreSQL issuing a NOTICE that comments get stripped if you use comments somewhere where PostgreSQL accepts them, but discards them silently? I think that is covered by this: http://www.postgresql.org/docs/9.0/interactive/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS