Re: [HACKERS] feature request: \qf datatype

2004-03-30 Thread Bruce Momjian

I added a mention of how to use the pager to lookup datatype mentions in
psql \df:

To look up functions taking argument or returning values of a specific
type, use your pager's search capability to scroll through the
\df output.

No one could come up with a good API to make this easier, so I think
mentioning a simple solution is best.

---

Alex J. Avriette wrote:
 On Fri, Dec 26, 2003 at 04:07:50PM -0800, David Fetter wrote:
 
  \dfT integer
  
  might bring back all the functions that operate on (or return)
  integers.
 
 I like this the best so far. My only concern is that there is a
 whole lot of output generated by this (see thread parent).
 
Duplication--especially for help systems--is not a bad thing, as
long as it's only duplication of access and not of code bases.
   
   Duplication of help systems that are never going to be used is a
   waste of everyone's time.
  
  Perhaps I didn't make clear what I was trying to say. :)
  
  We should continue to avoid the The docs for any given thing are
  findable in exactly one way.  If you don't divine it, you are S.O.L.
  model of documentation.
 
 Well, I'm perfectly happy to see it in psql. I'm just unable to
 actually do the C part myself. If somebody would step up to the plate,
 we could see this in the next release. I haven't heard anyone say they
 didn't like it.
 
 alex
 
 --
 [EMAIL PROTECTED]
 Alex J. Avriette, Windows Systems Defenestrator
 Object-oriented programming is an exceptionally bad idea which could only have 
 originated in California. - Edsger Dijkstra
 
 ---(end of broadcast)---
 TIP 7: don't forget to increase your free space map settings
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] feature request: \qf datatype

2003-12-26 Thread David Fetter
Alex J. Avriette [EMAIL PROTECTED] wrote:
 I'd like to request the following feature:
 
 Frequently when answering questions on IRC for people, questions
 fall into one of two categories, what function can I use to
 manipulate datatype xyz, and what datatype can i use for xyz.
 
 The latter is harder to answer than the former. For the former, I
 propose a macro in psql, \qf (query function). Obviously, the name
 implies a broader scope than simply querying the datatypes
 permissable.

I know this is just syntactical nit-picking, but I'm wondering where
this functionality belongs.  A few possibilities:

* Part of \dT (describing data types)
* Part of \df (for functions)
* A new \ command
* Non-empty subsets of the above
* And, of course, the all-important Stuff I Haven't Thought Of.

Duplication--especially for help systems--is not a bad thing, as long
as it's only duplication of access and not of code bases.

Just my $0.02 :)

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100cell: +1 415 235 3778

Who is wise?  He who learns from all.
 Ben Zoma, Pirkei Avot 4:1

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] feature request: \qf datatype

2003-12-26 Thread Alex J. Avriette
On Fri, Dec 26, 2003 at 11:49:20AM -0600, David Fetter wrote:

  The latter is harder to answer than the former. For the former, I
  propose a macro in psql, \qf (query function). Obviously, the name
  implies a broader scope than simply querying the datatypes
  permissable.

 * Part of \df (for functions)

This is my initial feeling. It really is just another \df. However,
I don't see a good way to merge the functionality of the new function
and the old function, as the parameter for df is the function name, not
its arguments.

 * Part of \dT (describing data types)

This, too would work, but again, I have a hard time figuring out where
to put the arguments.

 * A new \ command

The problem with this is that few people are going to notice it immediately
whereas I would contend that many people already know aobut \df and \dT.
The goal here is to get people to use the tools they have. If they're not
already seeking out tools, it doesn't help to add new ones.

 Duplication--especially for help systems--is not a bad thing, as long
 as it's only duplication of access and not of code bases.

Duplication of help systems that are never going to be used is a waste of
everyone's time.

Alex

--
[EMAIL PROTECTED]
Alex J. Avriette, Unix Systems Gladiator
Shut down some of the bullshit the government is spending money on and use it
to buy all the Microsoft stock. If we did that, we could ... just bronze Gates, 
turn him into a statue, and stick him in front of the Commerce Department. - Scott 
McNealy

---(end of broadcast)---
TIP 3: 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


Re: [HACKERS] feature request: \qf datatype

2003-12-26 Thread David Fetter
On Fri, Dec 26, 2003 at 06:34:47PM -0500, Alex J. Avriette wrote:
 On Fri, Dec 26, 2003 at 11:49:20AM -0600, David Fetter wrote:

   The latter is harder to answer than the former. For the former,
   I propose a macro in psql, \qf (query function). Obviously,
   the name implies a broader scope than simply querying the
   datatypes permissable.

  * Part of \df (for functions)

 This is my initial feeling. It really is just another \df.
 However, I don't see a good way to merge the functionality of the
 new function and the old function, as the parameter for df is the
 function name, not its arguments.

True.

  * Part of \dT (describing data types)

 This, too would work, but again, I have a hard time figuring out
 where to put the arguments.

Weelll, there's already a + operator, as in \df+.  Perhaps there could
be a T operator for data types and an f operator for functions, c.

\dfT integer

might bring back all the functions that operate on (or return)
integers.

  * A new \ command
 
 The problem with this is that few people are going to notice it
 immediately whereas I would contend that many people already know
 aobut \df and \dT.  The goal here is to get people to use the tools
 they have. If they're not already seeking out tools, it doesn't help
 to add new ones.
 
  Duplication--especially for help systems--is not a bad thing, as
  long as it's only duplication of access and not of code bases.
 
 Duplication of help systems that are never going to be used is a
 waste of everyone's time.

Perhaps I didn't make clear what I was trying to say. :)

We should continue to avoid the The docs for any given thing are
findable in exactly one way.  If you don't divine it, you are S.O.L.
model of documentation.

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100cell: +1 415 235 3778

There is nothing more difficult to take in hand, more perilous to
conduct, or more uncertain in its success, than to take the lead in
the introduction of a new order of things.  Because the innovator has
for enemies all those who have done well under the old conditions, and
lukewarm defenders in those who may do well under the new.
   Niccolo Machiavelli
   The Prince, 1513

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] feature request: \qf datatype

2003-12-26 Thread Alex J. Avriette
On Fri, Dec 26, 2003 at 04:07:50PM -0800, David Fetter wrote:

 \dfT integer
 
 might bring back all the functions that operate on (or return)
 integers.

I like this the best so far. My only concern is that there is a
whole lot of output generated by this (see thread parent).

   Duplication--especially for help systems--is not a bad thing, as
   long as it's only duplication of access and not of code bases.
  
  Duplication of help systems that are never going to be used is a
  waste of everyone's time.
 
 Perhaps I didn't make clear what I was trying to say. :)
 
 We should continue to avoid the The docs for any given thing are
 findable in exactly one way.  If you don't divine it, you are S.O.L.
 model of documentation.

Well, I'm perfectly happy to see it in psql. I'm just unable to
actually do the C part myself. If somebody would step up to the plate,
we could see this in the next release. I haven't heard anyone say they
didn't like it.

alex

--
[EMAIL PROTECTED]
Alex J. Avriette, Windows Systems Defenestrator
Object-oriented programming is an exceptionally bad idea which could only have 
originated in California. - Edsger Dijkstra

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings