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/ ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org