possibly outdated pg_file_read() errhint - Mailing list pgsql-hackers

From Mark Dilger
Subject possibly outdated pg_file_read() errhint
Date
Msg-id 01742E65-5ED3-4184-B5E2-441E870ECD5D@enterprisedb.com
Whole thread Raw
List pgsql-hackers
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
adminpack2.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
makeslittle 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






pgsql-hackers by date:

Previous
From: Zhihong Yu
Date:
Subject: Re: WIP: BRIN multi-range indexes
Next
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: libpq debug log