This small patch updates the information schema to show function parameter
names when they exist.

-- 
/Dennis Björklund
Index: doc/src/sgml/information_schema.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/information_schema.sgml,v
retrieving revision 1.13
diff -u -c -r1.13 information_schema.sgml
*** doc/src/sgml/information_schema.sgml        13 Dec 2003 23:59:06 -0000      1.13
--- doc/src/sgml/information_schema.sgml        22 Jan 2004 16:39:49 -0000
***************
*** 1895,1901 ****
       <row>
        <entry><literal>parameter_name</literal></entry>
        <entry><type>sql_identifier</type></entry>
!       <entry>Always null, since <productname>PostgreSQL</> does not support named 
parameters</entry>
       </row>
  
       <row>
--- 1895,1901 ----
       <row>
        <entry><literal>parameter_name</literal></entry>
        <entry><type>sql_identifier</type></entry>
!       <entry>The name of the parameter or null if this parameter has no name</entry>
       </row>
  
       <row>
Index: src/backend/catalog/information_schema.sql
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/catalog/information_schema.sql,v
retrieving revision 1.21
diff -u -c -r1.21 information_schema.sql
*** src/backend/catalog/information_schema.sql  17 Dec 2003 22:11:30 -0000      1.21
--- src/backend/catalog/information_schema.sql  22 Jan 2004 16:39:49 -0000
***************
*** 703,709 ****
             CAST('IN' AS character_data) AS parameter_mode,
             CAST('NO' AS character_data) AS is_result,
             CAST('NO' AS character_data) AS as_locator,
!            CAST(null AS sql_identifier) AS parameter_name,
             CAST(
               CASE WHEN t.typelem <> 0 AND t.typlen = -1 THEN 'ARRAY'
                    WHEN nt.nspname = 'pg_catalog' THEN format_type(t.oid, null)
--- 703,709 ----
             CAST('IN' AS character_data) AS parameter_mode,
             CAST('NO' AS character_data) AS is_result,
             CAST('NO' AS character_data) AS as_locator,
!            CAST(NULLIF(p.proargnames[pos.n], '') AS sql_identifier) AS 
parameter_name,
             CAST(
               CASE WHEN t.typelem <> 0 AND t.typlen = -1 THEN 'ARRAY'
                    WHEN nt.nspname = 'pg_catalog' THEN format_type(t.oid, null)
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to