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

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

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: HEAD \df doesn't show functions with no arguments
Date: 2005-03-31 18:15:40
Message-ID: 20050331181540.GA49768@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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/

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2005-03-31 18:45:15
Subject: Re: [COMMITTERS] pgsql: Translation updates
Previous:From: Peter EisentrautDate: 2005-03-31 18:14:25
Subject: pgsql: Translation updates

pgsql-patches by date

Next:From: Mark KirkwoodDate: 2005-03-31 23:41:19
Subject: Re: [HACKERS] contrib/pg_buffercache
Previous:From: Tom LaneDate: 2005-03-31 14:59:55
Subject: Re: Bug in DROP NOT NULL

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