Hi all,
The tip beneath \df on psql's documentation page[0] advises the user:
| Tip: To look up functions taking arguments or returning values
| of a specific type, use your pager's search capability to scroll
| through the \df output.
(This tip was put in[1] as an alternative to having a real 'show me
all functions taking this datatype' command in psql.)
Well, OK, but I don't know how to tell for sure which pager is in use
when the PAGER environment variable is unset, as it seems to be by
default on my machines. And assuming I guess correctly ('less', it
appears), or am willing to specify a particular pager, is this tip
really usable for searching function arguments? I can see how to do
something terribly crude, by setting a particular 'grep' command to
temporarily act as a pager:
test=# \setenv PAGER 'grep internal'
test=# \df
public | unaccent_init | internal | internal
| normal
public | unaccent_lexize | internal | internal,
internal, internal, internal | normal
test=# \setenv PAGER
but is there an easier way to "use your pager's search capability" I'm
missing, for some reasonable pager? The /pattern command for 'less'
isn't quite what I want, as it doesn't discard non-matching output.
Josh
[0] http://www.postgresql.org/docs/current/static/app-psql.html
[1] http://archives.postgresql.org/pgsql-hackers/2004-03/msg01290.php