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

BUG #2759: \df doesn't show functions with no args

From: "Leon Miller-Out" <pg_bugs(at)leonout(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2759: \df doesn't show functions with no args
Date: 2006-11-14 16:25:01
Message-ID: (view raw or whole thread)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2759
Logged by:          Leon Miller-Out
Email address:      pg_bugs(at)leonout(dot)com
PostgreSQL version: 8.1.5
Operating system:   CentOS 4.4 x64
Description:        \df doesn't show functions with no args

\df doesn't show functions with no arguments.

This is a documented problem, and appears to have been fixed in April 2005,
so I'm not sure why it's showing up here.


Running pgsql -E, then \dv outputs:

SELECT n.nspname as "Schema",
  p.proname as "Name",
  CASE WHEN p.proretset THEN 'setof ' ELSE '' END ||
  pg_catalog.format_type(p.prorettype, NULL) as "Result data type",
  pg_catalog.oidvectortypes(p.proargtypes) as "Argument data types"
FROM pg_catalog.pg_proc p
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype
      AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype
      AND NOT p.proisagg
      AND pg_catalog.pg_function_is_visible(p.oid)
ORDER BY 1, 2, 3, 4;

The line

AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype

Needs to be either 

AND (p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype
 OR p.proargtypes[0] IS NULL)

or gone completely. See thread at


pgsql-bugs by date

Next:From: Jim C. NasbyDate: 2006-11-14 19:15:59
Subject: Re: BUG #2758: missing quotes in SQL sentence
Previous:From: scoandaDate: 2006-11-14 15:42:53
Subject: BUG #2758: missing quotes in SQL sentence

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