HEAD \df doesn't show functions with no arguments - Mailing list pgsql-hackers

From Michael Fuhr
Subject HEAD \df doesn't show functions with no arguments
Date
Msg-id 20050331054908.GA39424@winnie.fuhr.org
Whole thread Raw
Responses Re: HEAD \df doesn't show functions with no arguments  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
In HEAD psql, \df doesn't show functions that have no arguments:
 test=> CREATE FUNCTION foo() RETURNS integer AS 'SELECT 1' LANGUAGE sql; CREATE FUNCTION test=> \df foo
   List of functions  Schema | Name | Result data type | Argument data types
--------+------+------------------+---------------------(0 rows)
 

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$';  proname  --------- (0 rows)  SELECT proargtypes[0], proargtypes[0] IS NULL FROM pg_proc WHERE
proname= 'foo';  proargtypes | ?column?  -------------+----------              | t (1 row)
 

Here's the latter query in 8.0.2beta1:
  proargtypes | ?column?  -------------+----------            0 | f (1 row)

I'm not sure when this broke -- perhaps with the recent oidvector
changes?

http://archives.postgresql.org/pgsql-committers/2005-03/msg00423.php

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Notes on lock table spilling
Next
From: Tom Lane
Date:
Subject: Re: HEAD \df doesn't show functions with no arguments