Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] HEAD \df doesn't show functions with no arguments

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] HEAD \df doesn't show functions with no arguments
Date: 2005-04-01 05:29:57
Message-ID: 200504010529.j315Tvv09698@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
I have applied the following attached patch to CVS to fix the \df
display problem you reported.  We might remove the test it at some point
but at least now it works as in previous releases.

---------------------------------------------------------------------------

Michael Fuhr wrote:
> On Thu, Mar 31, 2005 at 01:06:39AM -0500, Tom Lane wrote:
> > Michael Fuhr <mike(at)fuhr(dot)org> writes:
> > > The problem appears to be that proargtypes[0] is now NULL instead
> > > of 0.  Here's a simplified version of the \df query:
> > 
> > >   SELECT proname
> > >   FROM pg_catalog.pg_proc p
> > >   WHERE p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype
> > >     AND p.proname ~ '^foo$';
> > 
> > We could fix it by changing <> to IS DISTINCT FROM ... but I've never
> > been very happy with the idea that \df tries to suppress I/O functions
> > anyway.  How do you feel about removing the cstring test altogether?
> 
> Wouldn't bother me -- I'd rather see what's there and make the
> "uninteresting" call myself, if that's the only reason for not
> showing the I/O functions.  It's not like they'd overwhelm the
> output.
> 
> CREATE DATABASE foo TEMPLATE = template0;
> \c foo
> 
> SELECT count(*) FROM pg_proc WHERE proargtypes[0] = 'cstring'::regtype;
>  count 
> -------
>     63
> (1 row)
> 
> SELECT count(*) FROM pg_proc;
>  count 
> -------
>   1760
> (1 row)
> 
> -- 
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 

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

In response to

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2005-04-01 05:31:06
Subject: Re: HEAD \df doesn't show functions with no arguments
Previous:From: Tom LaneDate: 2005-04-01 05:26:20
Subject: Re: HEAD \df doesn't show functions with no arguments

pgsql-patches by date

Next:From: Christopher Kings-LynneDate: 2005-04-01 05:31:06
Subject: Re: HEAD \df doesn't show functions with no arguments
Previous:From: Tom LaneDate: 2005-04-01 05:26:20
Subject: Re: HEAD \df doesn't show functions with no arguments

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group