Folks,
This patch makes psql's \df display functions with the names of
parameters and OUT/INOUT if appropriate. Should there be a regression
test for this? A doc patch?
Cheers,
D
--
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
Index: src/bin/psql/describe.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/describe.c,v
retrieving revision 1.140
diff -r1.140 describe.c
173,174c173,195
< " pg_catalog.format_type(p.prorettype, NULL)
as \"%s\",\n"
< "
pg_catalog.oidvectortypes(p.proargtypes) as \"%s\"",
---
> "
> pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n"
> " CASE WHEN proallargtypes IS NOT
> NULL THEN\n"
> " array_to_string(ARRAY(\n"
> " SELECT\n"
> " CASE\n"
> " WHEN p.proargmodes[s.i] =
> 'i' THEN ''\n"
> " WHEN p.proargmodes[s.i] =
> 'o' THEN ' OUT '\n"
> " WHEN p.proargmodes[s.i] =
> 'b' THEN ' INOUT '\n"
> " END ||\n"
> " COALESCE(p.proargnames[s.i]
> || ' ','') ||\n"
> "
> format_type(p.proallargtypes[s.i],-1)\n"
> " FROM\n"
> "
> generate_series(1,array_upper(p.proallargtypes,1)) AS s(i)\n"
> " ), ',')\n"
> " ELSE\n"
> " array_to_string(ARRAY(\n"
> " SELECT\n"
> "
> COALESCE(p.proargnames[s.i+1] || ' ', '') ||\n"
> "
> format_type(p.proargtypes[s.i],-1)\n"
> " FROM\n"
> "
> generate_series(0,array_upper(p.proargtypes,1)) AS s(i)\n"
> " ), ',')\n"
> " END AS \"%s\"",
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly