Commit 9d888807 authored by Tom Lane's avatar Tom Lane

Support named parameters in information_schema.parameters,

per Dennis Bjorklund.  I did not force initdb for this, but
you'd need to do one to get the improved view.
parent c8bcd5ca
<!-- $PostgreSQL: pgsql/doc/src/sgml/information_schema.sgml,v 1.13 2003/12/13 23:59:06 neilc Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/information_schema.sgml,v 1.14 2004/01/24 23:45:13 tgl Exp $ -->
<chapter id="information-schema"> <chapter id="information-schema">
<title>The Information Schema</title> <title>The Information Schema</title>
...@@ -1823,7 +1823,7 @@ ORDER BY c.ordinal_position; ...@@ -1823,7 +1823,7 @@ ORDER BY c.ordinal_position;
<para> <para>
The view <literal>parameters</literal> contains information about The view <literal>parameters</literal> contains information about
the parameters (arguments) all functions in the current database. the parameters (arguments) of all functions in the current database.
Only those functions are shown that the current user has access to Only those functions are shown that the current user has access to
(by way of being the owner or having some privilege). (by way of being the owner or having some privilege).
</para> </para>
...@@ -1875,8 +1875,8 @@ ORDER BY c.ordinal_position; ...@@ -1875,8 +1875,8 @@ ORDER BY c.ordinal_position;
<entry><literal>parameter_mode</literal></entry> <entry><literal>parameter_mode</literal></entry>
<entry><type>character_data</type></entry> <entry><type>character_data</type></entry>
<entry> <entry>
Always <literal>IN</literal>, meaning input parameter (In the Always <literal>IN</literal>, meaning input parameter (in the
future there might be other parameter modes.) future there might be other parameter modes)
</entry> </entry>
</row> </row>
...@@ -1895,7 +1895,7 @@ ORDER BY c.ordinal_position; ...@@ -1895,7 +1895,7 @@ ORDER BY c.ordinal_position;
<row> <row>
<entry><literal>parameter_name</literal></entry> <entry><literal>parameter_name</literal></entry>
<entry><type>sql_identifier</type></entry> <entry><type>sql_identifier</type></entry>
<entry>Always null, since <productname>PostgreSQL</> does not support named parameters</entry> <entry>Name of the parameter, or null if the parameter has no name</entry>
</row> </row>
<row> <row>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Copyright 2003, PostgreSQL Global Development Group * Copyright 2003, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.21 2003/12/17 22:11:30 tgl Exp $ * $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.22 2004/01/24 23:45:13 tgl Exp $
*/ */
/* /*
...@@ -703,7 +703,7 @@ CREATE VIEW parameters AS ...@@ -703,7 +703,7 @@ CREATE VIEW parameters AS
CAST('IN' AS character_data) AS parameter_mode, CAST('IN' AS character_data) AS parameter_mode,
CAST('NO' AS character_data) AS is_result, CAST('NO' AS character_data) AS is_result,
CAST('NO' AS character_data) AS as_locator, CAST('NO' AS character_data) AS as_locator,
CAST(null AS sql_identifier) AS parameter_name, CAST(NULLIF(p.proargnames[pos.n], '') AS sql_identifier) AS parameter_name,
CAST( CAST(
CASE WHEN t.typelem <> 0 AND t.typlen = -1 THEN 'ARRAY' CASE WHEN t.typelem <> 0 AND t.typlen = -1 THEN 'ARRAY'
WHEN nt.nspname = 'pg_catalog' THEN format_type(t.oid, null) WHEN nt.nspname = 'pg_catalog' THEN format_type(t.oid, null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment