dbTalk Databases Forums  

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

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2759: \df doesn't show functions with no args in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Leon Miller-Out
 
Posts: n/a

Default [BUGS] BUG #2759: \df doesn't show functions with no args - 11-15-2006 , 01:43 PM







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
Details:

\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.

See:
http://groups.google.com/group/pgsql...ead/d28052b7da
9424b0/e6413772fc41324d%23e6413772fc41324d

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':g_catalog.regtype
AND p.proargtypes[0] <> 'pg_catalog.cstring':g_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':g_catalog.regtype

Needs to be either

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


or gone completely. See thread at
http://archives.postgresql.org/pgsql...3/msg01046.php

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #2759: \df doesn't show functions with no args - 11-20-2006 , 10:25 PM







I am wondering if you are using an old psql with your 8.1.X server.
I see in 8.2.X this output from psql \df:

pg_catalog | now | timestamp with time zone |

and I see similar code in 8.1.X. Do you see "now" showing up?

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

Leon Miller-Out wrote:
Quote:
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
Details:

\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.

See:
http://groups.google.com/group/pgsql...ead/d28052b7da
9424b0/e6413772fc41324d%23e6413772fc41324d

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':g_catalog.regtype
AND p.proargtypes[0] <> 'pg_catalog.cstring':g_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':g_catalog.regtype

Needs to be either

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


or gone completely. See thread at
http://archives.postgresql.org/pgsql...3/msg01046.php

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
--
Bruce Momjian bruce (AT) momjian (DOT) us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
Leon Miller-Out
 
Posts: n/a

Default Re: [BUGS] BUG #2759: \df doesn't show functions with no args - 11-24-2006 , 03:08 PM



Bruce, you're right... I was using an old client. I wasn't aware that
the client translated the \d commands into SQL. Thanks for clearing
this up!

Leon

On 11/20/06, Bruce Momjian <bruce (AT) momjian (DOT) us> wrote:
Quote:
I am wondering if you are using an old psql with your 8.1.X server.
I see in 8.2.X this output from psql \df:

pg_catalog | now | timestamp with time zone |

and I see similar code in 8.1.X. Do you see "now" showing up?

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

Leon Miller-Out wrote:

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
Details:

\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.

See:
http://groups.google.com/group/pgsql...ead/d28052b7da
9424b0/e6413772fc41324d%23e6413772fc41324d

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':g_catalog.regtype
AND p.proargtypes[0] <> 'pg_catalog.cstring':g_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':g_catalog.regtype

Needs to be either

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


or gone completely. See thread at
http://archives.postgresql.org/pgsql...3/msg01046.php

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

--
Bruce Momjian bruce (AT) momjian (DOT) us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.