Hackers,

The following errhint in pg_read_file() makes little sense:

                 errhint("Consider using %s, which is part of core, instead.",
                         "pg_file_read()")));

Grep'ing through master, there is almost nothing named pg_file_read, and what 
does exist is dropped when upgrading to adminpack 2.0:

Perhaps this errhint made sense at some point in the past?  It looks like core 
only uses this C-function named "pg_read_file" by the SQL function named 
"pg_read_file_old", but adminpack-1.0 also used it for a SQL function named 
pg_file_read, which gets dropped in the adminpack--1.1--2.0.sql upgrade file.  
If you haven't upgraded adminpack, it makes little sense to call adminpack's 
pg_file_read() function and get a hint telling you to instead use 
pg_file_read().  But calling pg_read_file_old() and being told to use 
pg_file_read() instead also doesn't make sense, because it doesn't exist.

I was going to submit a patch for this, but the more I look at it the less I 
understand what is intended by this code.  Thoughts?


—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





Reply via email to